@webex/contact-center 3.11.0-next.21 → 3.11.0-next.23
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 +71 -0
- package/dist/cc.js.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/metrics/behavioral-events.js +13 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/config/types.js +7 -1
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/Err.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +92 -17
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/task/TaskManager.js +60 -3
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/TaskUtils.js +16 -3
- package/dist/services/task/TaskUtils.js.map +1 -1
- package/dist/services/task/constants.js +5 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/dialer.js +51 -0
- package/dist/services/task/dialer.js.map +1 -1
- package/dist/services/task/types.js +15 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +31 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/types/services/config/types.d.ts +12 -0
- package/dist/types/services/core/Err.d.ts +2 -0
- package/dist/types/services/core/aqm-reqs.d.ts +49 -0
- package/dist/types/services/task/TaskUtils.d.ts +8 -0
- package/dist/types/services/task/constants.d.ts +4 -0
- package/dist/types/services/task/dialer.d.ts +15 -0
- package/dist/types/services/task/types.d.ts +23 -1
- package/dist/types.js.map +1 -1
- package/dist/webex.js +1 -1
- package/package.json +2 -2
- package/src/cc.ts +99 -1
- package/src/constants.ts +1 -0
- package/src/metrics/behavioral-events.ts +14 -0
- package/src/metrics/constants.ts +4 -0
- package/src/services/config/types.ts +6 -0
- package/src/services/core/Err.ts +1 -0
- package/src/services/core/aqm-reqs.ts +100 -22
- package/src/services/task/TaskManager.ts +75 -3
- package/src/services/task/TaskUtils.ts +12 -0
- package/src/services/task/constants.ts +4 -0
- package/src/services/task/dialer.ts +56 -1
- package/src/services/task/types.ts +24 -0
- package/src/types.ts +2 -1
- package/test/unit/spec/cc.ts +65 -0
- package/test/unit/spec/services/task/TaskManager.ts +281 -105
- package/test/unit/spec/services/task/dialer.ts +198 -112
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DESTINATION_TYPE","exports","QUEUE","DIALNUMBER","AGENT","ENTRYPOINT","CONSULT_TRANSFER_DESTINATION_TYPE","MEDIA_CHANNEL","EMAIL","CHAT","TELEPHONY","SOCIAL","SMS","FACEBOOK","WHATSAPP","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["import {CallId} from '@webex/calling/dist/types/common/types';\nimport EventEmitter from 'events';\nimport {Msg} from '../core/GlobalTypes';\nimport AutoWrapup from './AutoWrapup';\n\n/**\n * Unique identifier for a task in the contact center system\n * @public\n */\nexport type TaskId = string;\n\n/**\n * Helper type for creating enum-like objects with type safety\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * Defines the valid destination types for routing tasks within the contact center\n * Used to specify where a task should be directed\n * @public\n */\nexport const DESTINATION_TYPE = {\n /** Route task to a specific queue */\n QUEUE: 'queue',\n /** Route task to a specific dial number */\n DIALNUMBER: 'dialNumber',\n /** Route task to a specific agent */\n AGENT: 'agent',\n /** Route task to an entry point (supported only for consult operations) */\n ENTRYPOINT: 'entryPoint',\n};\n\n/**\n * Type representing valid destination types for task routing\n * Derived from the DESTINATION_TYPE constant\n * @public\n */\nexport type DestinationType = Enum<typeof DESTINATION_TYPE>;\n\n/**\n * Defines the valid destination types for consult transfer operations\n * Used when transferring a task after consultation\n * @public\n */\nexport const CONSULT_TRANSFER_DESTINATION_TYPE = {\n /** Transfer to a specific agent */\n AGENT: 'agent',\n /** Transfer to an entry point */\n ENTRYPOINT: 'entryPoint',\n /** Transfer to a dial number */\n DIALNUMBER: 'dialNumber',\n /** Transfer to a queue */\n QUEUE: 'queue',\n};\n\n/**\n * Type representing valid destination types for consult transfers\n * Derived from the CONSULT_TRANSFER_DESTINATION_TYPE constant\n * @public\n */\nexport type ConsultTransferDestinationType = Enum<typeof CONSULT_TRANSFER_DESTINATION_TYPE>;\n\n/**\n * Defines all supported media channel types for customer interactions\n * These represent the different ways customers can communicate with agents\n * @public\n */\nexport const MEDIA_CHANNEL = {\n /** Email-based communication channel */\n EMAIL: 'email',\n /** Web-based chat communication channel */\n CHAT: 'chat',\n /** Voice/phone communication channel */\n TELEPHONY: 'telephony',\n /** Social media platform communication channel */\n SOCIAL: 'social',\n /** SMS text messaging communication channel */\n SMS: 'sms',\n /** Facebook Messenger communication channel */\n FACEBOOK: 'facebook',\n /** WhatsApp messaging communication channel */\n WHATSAPP: 'whatsapp',\n} as const;\n\n/**\n * Type representing valid media channels\n * Derived from the MEDIA_CHANNEL constant\n * @public\n */\nexport type MEDIA_CHANNEL = Enum<typeof MEDIA_CHANNEL>;\n\n/**\n * Enumeration of all task-related events that can occur in the contact center system\n * These events represent different states and actions in the task lifecycle\n * @public\n */\nexport enum TASK_EVENTS {\n /**\n * Triggered when a new task is received by the system\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {\n * console.log('New task received:', task.data.interactionId);\n * // Handle incoming task\n * });\n * ```\n */\n TASK_INCOMING = 'task:incoming',\n\n /**\n * Triggered when a task is successfully assigned to an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {\n * console.log('Task assigned:', task.data.interactionId);\n * // Begin handling the assigned task\n * });\n * ```\n */\n TASK_ASSIGNED = 'task:assigned',\n\n /**\n * Triggered when the media state of a task changes\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {\n * // Handle media track updates\n * });\n * ```\n */\n TASK_MEDIA = 'task:media',\n\n /**\n * Triggered when a task is removed from an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {\n * console.log('Task unassigned:', task.data.interactionId);\n * // Clean up task resources\n * });\n * ```\n */\n TASK_UNASSIGNED = 'task:unassigned',\n\n /**\n * Triggered when a task is placed on hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {\n * console.log('Task placed on hold:', task.data.interactionId);\n * // Update UI to show hold state\n * });\n * ```\n */\n TASK_HOLD = 'task:hold',\n\n /**\n * Triggered when a task is resumed from hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RESUME, (task: ITask) => {\n * console.log('Task resumed from hold:', task.data.interactionId);\n * // Update UI to show active state\n * });\n * ```\n */\n TASK_RESUME = 'task:resume',\n\n /**\n * Triggered when a consultation session ends\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {\n * console.log('Consultation ended:', task.data.interactionId);\n * // Clean up consultation resources\n * });\n * ```\n */\n TASK_CONSULT_END = 'task:consultEnd',\n\n /**\n * Triggered when a queue consultation is cancelled\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {\n * console.log('Queue consultation cancelled:', task.data.interactionId);\n * // Handle consultation cancellation\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_CANCELLED = 'task:consultQueueCancelled',\n\n /**\n * Triggered when a queue consultation fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {\n * console.log('Queue consultation failed:', task.data.interactionId);\n * // Handle consultation failure\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_FAILED = 'task:consultQueueFailed',\n\n /**\n * Triggered when a consultation request is accepted\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {\n * console.log('Consultation accepted:', task.data.interactionId);\n * // Begin consultation\n * });\n * ```\n */\n TASK_CONSULT_ACCEPTED = 'task:consultAccepted',\n\n /**\n * Triggered when consultation is in progress\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {\n * console.log('Consulting in progress:', task.data.interactionId);\n * // Handle ongoing consultation\n * });\n * ```\n */\n TASK_CONSULTING = 'task:consulting',\n\n /**\n * Triggered when a new consultation is created\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {\n * console.log('Consultation created:', task.data.interactionId);\n * // Initialize consultation\n * });\n * ```\n */\n TASK_CONSULT_CREATED = 'task:consultCreated',\n\n /**\n * Triggered when a consultation is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {\n * console.log('Consultation offered:', task.data.interactionId);\n * // Handle consultation offer\n * });\n * ```\n */\n TASK_OFFER_CONSULT = 'task:offerConsult',\n\n /**\n * Triggered when a task is completed/terminated\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_END, (task: ITask) => {\n * console.log('Task ended:', task.data.interactionId);\n * // Clean up and finalize task\n * });\n * ```\n */\n TASK_END = 'task:end',\n\n /**\n * Triggered when a task enters wrap-up state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {\n * console.log('Task in wrap-up:', task.data.interactionId);\n * // Begin wrap-up process\n * });\n * ```\n */\n TASK_WRAPUP = 'task:wrapup',\n\n /**\n * Triggered when task wrap-up is completed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {\n * console.log('Task wrapped up:', task.data.interactionId);\n * // Finalize task completion\n * });\n * ```\n */\n TASK_WRAPPEDUP = 'task:wrappedup',\n\n /**\n * Triggered when recording is paused\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {\n * console.log('Recording paused:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_PAUSED = 'task:recordingPaused',\n\n /**\n * Triggered when recording pause attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {\n * console.log('Recording pause failed:', task.data.interactionId);\n * // Handle pause failure\n * });\n * ```\n */\n TASK_RECORDING_PAUSE_FAILED = 'task:recordingPauseFailed',\n\n /**\n * Triggered when recording is resumed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {\n * console.log('Recording resumed:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_RESUMED = 'task:recordingResumed',\n\n /**\n * Triggered when recording resume attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {\n * console.log('Recording resume failed:', task.data.interactionId);\n * // Handle resume failure\n * });\n * ```\n */\n TASK_RECORDING_RESUME_FAILED = 'task:recordingResumeFailed',\n\n /**\n * Triggered when a task is rejected/unanswered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {\n * console.log('Task rejected:', task.data.interactionId);\n * // Handle task rejection\n * });\n * ```\n */\n TASK_REJECT = 'task:rejected',\n\n /**\n * Triggered when an outdial call fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OUTDIAL_FAILED, (reason: string) => {\n * console.log('Outdial failed:', reason);\n * // Handle outdial failure\n * });\n * ```\n */\n TASK_OUTDIAL_FAILED = 'task:outdialFailed',\n\n /**\n * Triggered when a task is populated with data\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HYDRATE, (task: ITask) => {\n * console.log('Task hydrated:', task.data.interactionId);\n * // Process task data\n * });\n * ```\n */\n TASK_HYDRATE = 'task:hydrate',\n\n /**\n * Triggered when a new contact is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONTACT, (task: ITask) => {\n * console.log('Contact offered:', task.data.interactionId);\n * // Handle contact offer\n * });\n * ```\n */\n TASK_OFFER_CONTACT = 'task:offerContact',\n\n /**\n * Triggered when a task has been successfully auto-answered\n * This event is emitted after the SDK automatically accepts a task due to:\n * - WebRTC calls with auto-answer enabled\n * - Agent-initiated outdial calls\n * - Other auto-answer scenarios\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_AUTO_ANSWERED, (task: ITask) => {\n * console.log('Task auto-answered:', task.data.interactionId);\n * // Update UI - enable cancel button, etc.\n * });\n * ```\n */\n TASK_AUTO_ANSWERED = 'task:autoAnswered',\n\n /**\n * Triggered when a conference is being established\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_ESTABLISHING, (task: ITask) => {\n * console.log('Conference establishing:', task.data.interactionId);\n * // Handle conference setup in progress\n * });\n * ```\n */\n TASK_CONFERENCE_ESTABLISHING = 'task:conferenceEstablishing',\n\n /**\n * Triggered when a conference is started successfully\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_STARTED, (task: ITask) => {\n * console.log('Conference started:', task.data.interactionId);\n * // Handle conference start\n * });\n * ```\n */\n TASK_CONFERENCE_STARTED = 'task:conferenceStarted',\n\n /**\n * Triggered when a conference fails to start\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_FAILED, (task: ITask) => {\n * console.log('Conference failed:', task.data.interactionId);\n * // Handle conference failure\n * });\n * ```\n */\n TASK_CONFERENCE_FAILED = 'task:conferenceFailed',\n\n /**\n * Triggered when a conference is ended successfully\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_ENDED, (task: ITask) => {\n * console.log('Conference ended:', task.data.interactionId);\n * // Handle conference end\n * });\n * ```\n */\n TASK_CONFERENCE_ENDED = 'task:conferenceEnded',\n\n /**\n * Triggered when a participant joins the conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_JOINED, (task: ITask) => {\n * console.log('Participant joined conference:', task.data.interactionId);\n * // Handle participant joining\n * });\n * ```\n */\n TASK_PARTICIPANT_JOINED = 'task:participantJoined',\n\n /**\n * Triggered when a participant leaves the conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT, (task: ITask) => {\n * console.log('Participant left conference:', task.data.interactionId);\n * // Handle participant leaving\n * });\n * ```\n */\n TASK_PARTICIPANT_LEFT = 'task:participantLeft',\n\n /**\n * Triggered when conference transfer is successful\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFERRED, (task: ITask) => {\n * console.log('Conference transferred:', task.data.interactionId);\n * // Handle successful conference transfer\n * });\n * ```\n */\n TASK_CONFERENCE_TRANSFERRED = 'task:conferenceTransferred',\n\n /**\n * Triggered when conference transfer fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFER_FAILED, (task: ITask) => {\n * console.log('Conference transfer failed:', task.data.interactionId);\n * // Handle failed conference transfer\n * });\n * ```\n */\n TASK_CONFERENCE_TRANSFER_FAILED = 'task:conferenceTransferFailed',\n\n /**\n * Triggered when ending a conference fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_END_FAILED, (task: ITask) => {\n * console.log('Conference end failed:', task.data.interactionId);\n * // Handle failed conference end\n * });\n * ```\n */\n TASK_CONFERENCE_END_FAILED = 'task:conferenceEndFailed',\n\n /**\n * Triggered when participant exit from conference fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT_FAILED, (task: ITask) => {\n * console.log('Participant failed to leave conference:', task.data.interactionId);\n * // Handle failed participant exit\n * });\n * ```\n */\n TASK_PARTICIPANT_LEFT_FAILED = 'task:participantLeftFailed',\n\n /**\n * Triggered when a contact is merged\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MERGED, (task: ITask) => {\n * console.log('Contact merged:', task.data.interactionId);\n * // Handle contact merge\n * });\n * ```\n */\n TASK_MERGED = 'task:merged',\n\n /**\n * Triggered when a participant enters post-call activity state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_POST_CALL_ACTIVITY, (task: ITask) => {\n * console.log('Participant in post-call activity:', task.data.interactionId);\n * // Handle post-call activity\n * });\n * ```\n */\n TASK_POST_CALL_ACTIVITY = 'task:postCallActivity',\n}\n\n/**\n * Represents a customer interaction within the contact center system\n * Contains comprehensive details about an ongoing customer interaction\n * @public\n */\nexport type Interaction = {\n /** Indicates if the interaction is managed by Flow Control */\n isFcManaged: boolean;\n /** Indicates if the interaction has been terminated */\n isTerminated: boolean;\n /** The type of media channel for this interaction */\n mediaType: MEDIA_CHANNEL;\n /** List of previous virtual teams that handled this interaction */\n previousVTeams: string[];\n /** Current state of the interaction */\n state: string;\n /** Current virtual team handling the interaction */\n currentVTeam: string;\n /** List of participants in the interaction */\n participants: any; // TODO: Define specific participant type\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Timestamp when the interaction was created */\n createdTimestamp?: number;\n /** Indicates if wrap-up assistance is enabled */\n isWrapUpAssist?: boolean;\n /** Detailed call processing information and metadata */\n callProcessingDetails: {\n /** Name of the Queue Manager handling this interaction */\n QMgrName: string;\n /** Indicates if the task should be self-serviced */\n taskToBeSelfServiced: string;\n /** Automatic Number Identification (caller's number) */\n ani: string;\n /** Display version of the ANI */\n displayAni: string;\n /** Dialed Number Identification Service number */\n dnis: string;\n /** Tenant identifier */\n tenantId: string;\n /** Queue identifier */\n QueueId: string;\n /** Virtual team identifier */\n vteamId: string;\n /** Indicates if pause/resume functionality is enabled */\n pauseResumeEnabled?: string;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Indicates if the interaction is currently paused */\n isPaused?: string;\n /** Indicates if recording is in progress */\n recordInProgress?: string;\n /** Indicates if recording has started */\n recordingStarted?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: string;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: string;\n /** IVR conversation transcript */\n convIvrTranscript?: string;\n /** Customer's name */\n customerName: string;\n /** Name of the virtual team */\n virtualTeamName: string;\n /** RONA (Redirection on No Answer) timeout in seconds */\n ronaTimeout: string;\n /** Category of the interaction */\n category: string;\n /** Reason for the interaction */\n reason: string;\n /** Source number for the interaction */\n sourceNumber: string;\n /** Source page that initiated the interaction */\n sourcePage: string;\n /** Application user identifier */\n appUser: string;\n /** Customer's contact number */\n customerNumber: string;\n /** Code indicating the reason for interaction */\n reasonCode: string;\n /** Path taken through the IVR system */\n IvrPath: string;\n /** Identifier for the IVR path */\n pathId: string;\n /** Email address or contact point that initiated the interaction */\n fromAddress: string;\n /** Identifier of the parent interaction for related interactions */\n parentInteractionId?: string;\n /** Identifier of the child interaction for related interactions */\n childInteractionId?: string;\n /** Type of relationship between parent and child interactions */\n relationshipType?: string;\n /** ANI of the parent interaction */\n parent_ANI?: string;\n /** DNIS of the parent interaction */\n parent_DNIS?: string;\n /** Indicates if the consulted destination agent has joined */\n consultDestinationAgentJoined?: boolean | string;\n /** Name of the destination agent for consultation */\n consultDestinationAgentName?: string;\n /** DN of the parent interaction's agent */\n parent_Agent_DN?: string;\n /** Name of the parent interaction's agent */\n parent_Agent_Name?: string;\n /** Team name of the parent interaction's agent */\n parent_Agent_TeamName?: string;\n /** Indicates if the interaction is in conference mode */\n isConferencing?: string;\n /** Type of monitoring being performed */\n monitorType?: string;\n /** Name of the workflow being executed */\n workflowName?: string;\n /** Identifier of the workflow */\n workflowId?: string;\n /** Indicates if monitoring is in invisible mode */\n monitoringInvisibleMode?: string;\n /** Identifier for the monitoring request */\n monitoringRequestId?: string;\n /** Timeout for participant invitation */\n participantInviteTimeout?: string;\n /** Filename for music on hold */\n mohFileName?: string;\n /** Flag for continuing recording during transfer */\n CONTINUE_RECORDING_ON_TRANSFER?: string;\n /** Entry point identifier */\n EP_ID?: string;\n /** Type of routing being used */\n ROUTING_TYPE?: string;\n /** Events registered with Flow Control Engine */\n fceRegisteredEvents?: string;\n /** Indicates if the interaction is parked */\n isParked?: string;\n /** Priority level of the interaction */\n priority?: string;\n /** Identifier for the routing strategy */\n routingStrategyId?: string;\n /** Current state of monitoring */\n monitoringState?: string;\n /** Indicates if blind transfer is in progress */\n BLIND_TRANSFER_IN_PROGRESS?: boolean;\n /** Desktop view configuration for Flow Control */\n fcDesktopView?: string;\n /** Agent ID who initiated the outdial call */\n outdialAgentId?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Media-specific information for the interaction */\n media: Record<\n string,\n {\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of media channel */\n mediaType: MEDIA_CHANNEL;\n /** Media manager handling this media */\n mediaMgr: string;\n /** List of participant identifiers */\n participants: string[];\n /** Type of media */\n mType: string;\n /** Indicates if media is on hold */\n isHold: boolean;\n /** Timestamp when media was put on hold */\n holdTimestamp: number | null;\n }\n >;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: MEDIA_CHANNEL;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Parameters passed through the call flow */\n callFlowParams: Record<\n string,\n {\n /** Name of the parameter */\n name: string;\n /** Qualifier for the parameter */\n qualifier: string;\n /** Description of the parameter */\n description: string;\n /** Data type of the parameter value */\n valueDataType: string;\n /** Value of the parameter */\n value: string;\n }\n >;\n};\n\n/**\n * Task payload containing detailed information about a contact center task\n * This structure encapsulates all relevant data for task management\n * @public\n */\nexport type TaskData = {\n /** Unique identifier for the media resource handling this task */\n mediaResourceId: string;\n /** Type of event that triggered this task data */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Identifier of the agent handling the task */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the task */\n trackingId: string;\n /** Media resource identifier for consultation operations */\n consultMediaResourceId: string;\n /** Detailed interaction information */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the task is from the owner */\n fromOwner?: boolean;\n /** Indicates if the task is to the owner */\n toOwner?: boolean;\n /** Identifier for child interaction in consult/transfer scenarios */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the task */\n owner: string;\n /** Queue manager handling the task */\n queueMgr: string;\n /** Name of the queue where task is queued */\n queueName?: string;\n /** Type of the task */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the task is in consultation state */\n isConsulted?: boolean;\n /** Indicates if the task is in conference state */\n isConferencing: boolean;\n /** Indicates if a conference is currently in progress (2+ active agents) */\n isConferenceInProgress?: boolean;\n /** Identifier of agent who last updated the task */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the task was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including state and media information */\n task?: Interaction;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel (used for campaign tasks) */\n reservedAgentChannelId?: string;\n /** Indicates if wrap-up is required for this task */\n wrapUpRequired?: boolean;\n /** Indicates if auto-answer is in progress for this task */\n isAutoAnswering?: boolean;\n /** Indicates if wrap-up is required for this task */\n agentsPendingWrapUp?: string[];\n};\n\n/**\n * Type representing an agent contact message within the contact center system\n * Contains comprehensive interaction and task related details for agent operations\n * @public\n */\nexport type AgentContact = Msg<{\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of the event (e.g., 'AgentDesktopMessage') */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Unique identifier of the agent handling the contact */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the contact */\n trackingId: string;\n /** Media resource identifier for consult operations */\n consultMediaResourceId: string;\n /** Detailed interaction information including media and participant data */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the message is from the owner of the interaction */\n fromOwner?: boolean;\n /** Indicates if the message is to the owner of the interaction */\n toOwner?: boolean;\n /** Identifier for child interaction in case of consult/transfer */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the interaction */\n owner: string;\n /** Queue manager handling the interaction */\n queueMgr: string;\n /** Name of the queue where interaction is queued */\n queueName?: string;\n /** Type of the contact/interaction */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the interaction is in consult state */\n isConsulted?: boolean;\n /** Indicates if the interaction is in conference state */\n isConferencing: boolean;\n /** Identifier of the agent who last updated the interaction */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the interaction was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including media and state information */\n task?: Interaction;\n /** Identifier of the supervisor monitoring the interaction */\n supervisorId?: string;\n /** Type of monitoring (e.g., 'SILENT', 'BARGE_IN') */\n monitorType?: string;\n /** Dial number of the supervisor */\n supervisorDN?: string;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel */\n reservedAgentChannelId?: string;\n /** Current monitoring state information */\n monitoringState?: {\n /** Type of monitoring state */\n type: string;\n };\n /** Name of the supervisor monitoring the interaction */\n supervisorName?: string;\n}>;\n\n/**\n * Information about a virtual team in the contact center\n * @ignore\n */\nexport type VTeam = {\n /** Profile ID of the agent in the virtual team */\n agentProfileId: string;\n /** Session ID of the agent in the virtual team */\n agentSessionId: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Type of the virtual team */\n type: string;\n /** Optional tracking identifier */\n trackingId?: string;\n};\n\n/**\n * Detailed information about a virtual team configuration\n * @ignore\n */\nexport type VteamDetails = {\n /** Name of the virtual team */\n name: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Unique identifier for the virtual team */\n id: string;\n /** Type of the virtual team */\n type: string;\n /** ID of the analyzer associated with the team */\n analyzerId: string;\n};\n\n/**\n * Response type for successful virtual team operations\n * Contains details about virtual teams and their capabilities\n * @ignore\n */\nexport type VTeamSuccess = Msg<{\n /** Response data containing team information */\n data: {\n /** List of virtual team details */\n vteamList: Array<VteamDetails>;\n /** Whether queue consultation is allowed */\n allowConsultToQueue: boolean;\n };\n /** Method name from JavaScript */\n jsMethod: string;\n /** Data related to the call */\n callData: string;\n /** Session ID of the agent */\n agentSessionId: string;\n}>;\n\n/**\n * Parameters for putting a task on hold or resuming from hold\n * @public\n */\nexport type HoldResumePayload = {\n /** Unique identifier for the media resource to hold/resume */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for resuming a task's recording\n * @public\n */\nexport type ResumeRecordingPayload = {\n /** Indicates if the recording was automatically resumed */\n autoResumed: boolean;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayLoad = {\n /** Destination identifier where the task will be transferred to */\n to: string;\n /** Type of the destination (queue, agent, etc.) */\n destinationType: DestinationType;\n};\n\n/**\n * Parameters for initiating a consultative transfer\n * @public\n */\nexport type ConsultTransferPayLoad = {\n /** Destination identifier for the consultation transfer */\n to: string;\n /** Type of the consultation transfer destination */\n destinationType: ConsultTransferDestinationType;\n};\n\n/**\n * Parameters for initiating a consultation with another agent or queue\n * @public\n */\nexport type ConsultPayload = {\n /** Destination identifier for the consultation */\n to: string | undefined;\n /** Type of the consultation destination (agent, queue, etc.) */\n destinationType: DestinationType;\n /** Whether to hold other participants during consultation (always true) */\n holdParticipants?: boolean;\n};\n\n/**\n * Parameters for ending a consultation task\n * @public\n */\nexport type ConsultEndPayload = {\n /** Indicates if this is a consultation operation */\n isConsult: boolean;\n /** Indicates if this involves a secondary entry point or DN agent */\n isSecondaryEpDnAgent?: boolean;\n /** Optional queue identifier for the consultation */\n queueId?: string;\n /** Identifier of the task being consulted */\n taskId: string;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayload = {\n /** Destination identifier where the task will be transferred */\n to: string | undefined;\n /** Type of the transfer destination */\n destinationType: DestinationType;\n};\n\n/**\n * API payload for ending a consultation\n * This is the actual payload that is sent to the developer API\n * @public\n */\nexport type ConsultEndAPIPayload = {\n /** Optional identifier of the queue involved in the consultation */\n queueId?: string;\n};\n\n/**\n * Data required for consulting and conferencing operations\n * @public\n */\nexport type ConsultConferenceData = {\n /** Identifier of the agent initiating consult/conference */\n agentId?: string;\n /** Target destination for the consult/conference */\n to: string | undefined;\n /** Type of destination (e.g., 'agent', 'queue') */\n destinationType: string;\n};\n\n/**\n * Parameters required for cancelling a consult to queue operation\n * @public\n */\nexport type cancelCtq = {\n /** Identifier of the agent cancelling the CTQ */\n agentId: string;\n /** Identifier of the queue where consult was initiated */\n queueId: string;\n};\n\n/**\n * Parameters required for declining a task\n * @public\n */\nexport type declinePayload = {\n /** Identifier of the media resource to decline */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for wrapping up a task with relevant completion details\n * @public\n */\nexport type WrapupPayLoad = {\n /** The reason provided for wrapping up the task */\n wrapUpReason: string;\n /** Auxiliary code identifier associated with the wrap-up state */\n auxCodeId: string;\n};\n\n/**\n * Configuration parameters for initiating outbound dialer tasks\n * @public\n */\nexport type DialerPayload = {\n /** An entryPointId for respective task */\n entryPointId: string;\n /** A valid customer DN, on which the response is expected, maximum length 36 characters */\n destination: string;\n /** The direction of the call */\n direction: 'OUTBOUND';\n /** Schema-free data tuples to pass specific data based on outboundType (max 30 tuples) */\n attributes: {[key: string]: string};\n /** The media type for the request */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n /** The outbound type for the task */\n outboundType: 'OUTDIAL' | 'CALLBACK' | 'EXECUTE_FLOW';\n /** The Outdial ANI number that will be used while making a call to the customer. */\n origin: string;\n};\n\n/**\n * Data structure for cleaning up contact resources\n * @public\n */\nexport type ContactCleanupData = {\n /** Type of cleanup operation being performed */\n type: string;\n /** Organization identifier where cleanup is occurring */\n orgId: string;\n /** Identifier of the agent associated with the contacts */\n agentId: string;\n /** Detailed data about the cleanup operation */\n data: {\n /** Type of event that triggered the cleanup */\n eventType: string;\n /** Identifier of the interaction being cleaned up */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Media manager handling the cleanup */\n mediaMgr: string;\n /** Tracking identifier for the cleanup operation */\n trackingId: string;\n /** Type of media being cleaned up */\n mediaType: string;\n /** Optional destination information */\n destination?: string;\n /** Whether this is a broadcast cleanup */\n broadcast: boolean;\n /** Type of cleanup being performed */\n type: string;\n };\n};\n\n/**\n * Response type for task public methods\n * Can be an {@link AgentContact} object containing updated task state,\n * an Error in case of failure, or void for operations that don't return data\n * @public\n */\nexport type TaskResponse = AgentContact | Error | void;\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends EventEmitter to support event-driven task updates\n */\nexport interface ITask extends EventEmitter {\n /**\n * Event data received in the Contact Center events.\n * Contains detailed task information including interaction details, media resources,\n * and participant data as defined in {@link TaskData}\n */\n data: TaskData;\n\n /**\n * Map associating tasks with their corresponding call identifiers.\n */\n webCallMap: Record<TaskId, CallId>;\n\n /**\n * Auto-wrapup timer for the task\n * This is used to automatically wrap up tasks after a specified duration\n * as defined in {@link AutoWrapup}\n */\n autoWrapup?: AutoWrapup;\n\n /**\n * Cancels the auto-wrapup timer for the task.\n * This method stops the auto-wrapup process if it is currently active.\n * Note: This is supported only in single session mode. Not supported in multi-session mode.\n * @returns void\n */\n cancelAutoWrapupTimer(): void;\n\n /**\n * Deregisters all web call event listeners.\n * Used when cleaning up task resources.\n * @ignore\n */\n unregisterWebCallListeners(): void;\n\n /**\n * Updates the task data with new information\n * @param newData - Updated task data to apply, must conform to {@link TaskData} structure\n * @returns Updated task instance\n * @ignore\n */\n updateTaskData(newData: TaskData): ITask;\n\n /**\n * Answers or accepts an incoming task.\n * Once accepted, the task will be assigned to the agent and trigger a {@link TASK_EVENTS.TASK_ASSIGNED} event.\n * The response will contain updated agent contact information as defined in {@link AgentContact}.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.accept();\n * ```\n */\n accept(): Promise<TaskResponse>;\n\n /**\n * Declines an incoming task for Browser Login\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n\n /**\n * Places the current task on hold.\n * @param mediaResourceId - Optional media resource ID to use for the hold operation. If not provided, uses the task's current mediaResourceId\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * // Hold with default mediaResourceId\n * await task.hold();\n *\n * // Hold with custom mediaResourceId\n * await task.hold('custom-media-resource-id');\n * ```\n */\n hold(mediaResourceId?: string): Promise<TaskResponse>;\n\n /**\n * Resumes a task that was previously on hold.\n * @param mediaResourceId - Optional media resource ID to use for the resume operation. If not provided, uses the task's current mediaResourceId from interaction media\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * // Resume with default mediaResourceId\n * await task.resume();\n *\n * // Resume with custom mediaResourceId\n * await task.resume('custom-media-resource-id');\n * ```\n */\n resume(mediaResourceId?: string): Promise<TaskResponse>;\n\n /**\n * Ends/terminates the current task.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.end();\n * ```\n */\n end(): Promise<TaskResponse>;\n\n /**\n * Initiates wrap-up process for the task with specified details.\n * @param wrapupPayload - Wrap-up details including reason and auxiliary code\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.wrapup({\n * wrapUpReason: \"Customer issue resolved\",\n * auxCodeId: \"RESOLVED\"\n * });\n * ```\n */\n wrapup(wrapupPayload: WrapupPayLoad): Promise<TaskResponse>;\n\n /**\n * Pauses the recording for current task.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.pauseRecording();\n * ```\n */\n pauseRecording(): Promise<TaskResponse>;\n\n /**\n * Resumes a previously paused recording.\n * @param resumeRecordingPayload - Parameters for resuming the recording\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.resumeRecording({\n * autoResumed: false\n * });\n * ```\n */\n resumeRecording(resumeRecordingPayload: ResumeRecordingPayload): Promise<TaskResponse>;\n\n /**\n * Initiates a consultation with another agent or queue.\n * @param consultPayload - Consultation details including destination and type\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consult({ to: \"agentId\", destinationType: \"agent\" });\n * ```\n */\n consult(consultPayload: ConsultPayload): Promise<TaskResponse>;\n\n /**\n * Ends an ongoing consultation.\n * @param consultEndPayload - Details for ending the consultation\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.endConsult({ isConsult: true, taskId: \"taskId\" });\n * ```\n */\n endConsult(consultEndPayload: ConsultEndPayload): Promise<TaskResponse>;\n\n /**\n * Transfers the task to another agent or queue.\n * @param transferPayload - Transfer details including destination and type\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.transfer({ to: \"queueId\", destinationType: \"queue\" });\n * ```\n */\n transfer(transferPayload: TransferPayLoad): Promise<TaskResponse>;\n\n /**\n * Transfers the task after consultation.\n * @param consultTransferPayload - Details for consult transfer (optional)\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consultTransfer({ to: \"agentId\", destinationType: \"agent\" });\n * ```\n */\n consultTransfer(consultTransferPayload?: ConsultTransferPayLoad): Promise<TaskResponse>;\n\n /**\n * Initiates a consult conference (merge consult call with main call).\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consultConference();\n * ```\n */\n consultConference(): Promise<TaskResponse>;\n\n /**\n * Exits from an ongoing conference.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.exitConference();\n * ```\n */\n exitConference(): Promise<TaskResponse>;\n\n /**\n * Transfers the conference to another participant.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.transferConference();\n * ```\n */\n transferConference(): Promise<TaskResponse>;\n\n /**\n * Toggles mute/unmute for the local audio stream during a WebRTC task.\n * @returns Promise<void>\n * @example\n * ```typescript\n * await task.toggleMute();\n * ```\n */\n toggleMute(): Promise<void>;\n}\n"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9B;EACAE,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMC,iCAAiC,GAAAL,OAAA,CAAAK,iCAAA,GAAG;EAC/C;EACAF,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAF,UAAU,EAAE,YAAY;EACxB;EACAD,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMK,aAAa,GAAAN,OAAA,CAAAM,aAAA,GAAG;EAC3B;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,MAAM,EAAE,QAAQ;EAChB;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAAd,OAAA,CAAAc,WAAA,0BAAXA,WAAW;EACrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAVYA,WAAW;EAarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtBYA,WAAW;EAyBrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjCYA,WAAW;EAoCrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7CYA,WAAW;EAgDrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzDYA,WAAW;EA4DrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArEYA,WAAW;EAwErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjFYA,WAAW;EAoFrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7FYA,WAAW;EAgGrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzGYA,WAAW;EA4GrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArHYA,WAAW;EAwHrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjIYA,WAAW;EAoIrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7IYA,WAAW;EAgJrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzJYA,WAAW;EA4JrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArKYA,WAAW;EAwKrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjLYA,WAAW;EAoLrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7LYA,WAAW;EAgMrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzMYA,WAAW;EA4MrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArNYA,WAAW;EAwNrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjOYA,WAAW;EAoOrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7OYA,WAAW;EAgPrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzPYA,WAAW;EA4PrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArQYA,WAAW;EAwQrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjRYA,WAAW;EAoRrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7RYA,WAAW;EAgSrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7SYA,WAAW;EAgTrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzTYA,WAAW;EA4TrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArUYA,WAAW;EAwUrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjVYA,WAAW;EAoVrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7VYA,WAAW;EAgWrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzWYA,WAAW;EA4WrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArXYA,WAAW;EAwXrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjYYA,WAAW;EAoYrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7YYA,WAAW;EAgZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzZYA,WAAW;EA4ZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAraYA,WAAW;EAwarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjbYA,WAAW;EAobrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7bYA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAicvB;AACA;AACA;AACA;AACA;AA+LA;AACA;AACA;AACA;AACA;AA8EA;AACA;AACA;AACA;AACA;AAmFA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AA+BA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["DESTINATION_TYPE","exports","QUEUE","DIALNUMBER","AGENT","ENTRYPOINT","CONSULT_TRANSFER_DESTINATION_TYPE","MEDIA_CHANNEL","EMAIL","CHAT","TELEPHONY","SOCIAL","SMS","FACEBOOK","WHATSAPP","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["import {CallId} from '@webex/calling/dist/types/common/types';\nimport EventEmitter from 'events';\nimport {Msg} from '../core/GlobalTypes';\nimport AutoWrapup from './AutoWrapup';\n\n/**\n * Unique identifier for a task in the contact center system\n * @public\n */\nexport type TaskId = string;\n\n/**\n * Helper type for creating enum-like objects with type safety\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * Defines the valid destination types for routing tasks within the contact center\n * Used to specify where a task should be directed\n * @public\n */\nexport const DESTINATION_TYPE = {\n /** Route task to a specific queue */\n QUEUE: 'queue',\n /** Route task to a specific dial number */\n DIALNUMBER: 'dialNumber',\n /** Route task to a specific agent */\n AGENT: 'agent',\n /** Route task to an entry point (supported only for consult operations) */\n ENTRYPOINT: 'entryPoint',\n};\n\n/**\n * Type representing valid destination types for task routing\n * Derived from the DESTINATION_TYPE constant\n * @public\n */\nexport type DestinationType = Enum<typeof DESTINATION_TYPE>;\n\n/**\n * Defines the valid destination types for consult transfer operations\n * Used when transferring a task after consultation\n * @public\n */\nexport const CONSULT_TRANSFER_DESTINATION_TYPE = {\n /** Transfer to a specific agent */\n AGENT: 'agent',\n /** Transfer to an entry point */\n ENTRYPOINT: 'entryPoint',\n /** Transfer to a dial number */\n DIALNUMBER: 'dialNumber',\n /** Transfer to a queue */\n QUEUE: 'queue',\n};\n\n/**\n * Type representing valid destination types for consult transfers\n * Derived from the CONSULT_TRANSFER_DESTINATION_TYPE constant\n * @public\n */\nexport type ConsultTransferDestinationType = Enum<typeof CONSULT_TRANSFER_DESTINATION_TYPE>;\n\n/**\n * Defines all supported media channel types for customer interactions\n * These represent the different ways customers can communicate with agents\n * @public\n */\nexport const MEDIA_CHANNEL = {\n /** Email-based communication channel */\n EMAIL: 'email',\n /** Web-based chat communication channel */\n CHAT: 'chat',\n /** Voice/phone communication channel */\n TELEPHONY: 'telephony',\n /** Social media platform communication channel */\n SOCIAL: 'social',\n /** SMS text messaging communication channel */\n SMS: 'sms',\n /** Facebook Messenger communication channel */\n FACEBOOK: 'facebook',\n /** WhatsApp messaging communication channel */\n WHATSAPP: 'whatsapp',\n} as const;\n\n/**\n * Type representing valid media channels\n * Derived from the MEDIA_CHANNEL constant\n * @public\n */\nexport type MEDIA_CHANNEL = Enum<typeof MEDIA_CHANNEL>;\n\n/**\n * Enumeration of all task-related events that can occur in the contact center system\n * These events represent different states and actions in the task lifecycle\n * @public\n */\nexport enum TASK_EVENTS {\n /**\n * Triggered when a new task is received by the system\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {\n * console.log('New task received:', task.data.interactionId);\n * // Handle incoming task\n * });\n * ```\n */\n TASK_INCOMING = 'task:incoming',\n\n /**\n * Triggered when a task is successfully assigned to an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {\n * console.log('Task assigned:', task.data.interactionId);\n * // Begin handling the assigned task\n * });\n * ```\n */\n TASK_ASSIGNED = 'task:assigned',\n\n /**\n * Triggered when the media state of a task changes\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {\n * // Handle media track updates\n * });\n * ```\n */\n TASK_MEDIA = 'task:media',\n\n /**\n * Triggered when a task is removed from an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {\n * console.log('Task unassigned:', task.data.interactionId);\n * // Clean up task resources\n * });\n * ```\n */\n TASK_UNASSIGNED = 'task:unassigned',\n\n /**\n * Triggered when a task is placed on hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {\n * console.log('Task placed on hold:', task.data.interactionId);\n * // Update UI to show hold state\n * });\n * ```\n */\n TASK_HOLD = 'task:hold',\n\n /**\n * Triggered when a task is resumed from hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RESUME, (task: ITask) => {\n * console.log('Task resumed from hold:', task.data.interactionId);\n * // Update UI to show active state\n * });\n * ```\n */\n TASK_RESUME = 'task:resume',\n\n /**\n * Triggered when a consultation session ends\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {\n * console.log('Consultation ended:', task.data.interactionId);\n * // Clean up consultation resources\n * });\n * ```\n */\n TASK_CONSULT_END = 'task:consultEnd',\n\n /**\n * Triggered when a queue consultation is cancelled\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {\n * console.log('Queue consultation cancelled:', task.data.interactionId);\n * // Handle consultation cancellation\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_CANCELLED = 'task:consultQueueCancelled',\n\n /**\n * Triggered when a queue consultation fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {\n * console.log('Queue consultation failed:', task.data.interactionId);\n * // Handle consultation failure\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_FAILED = 'task:consultQueueFailed',\n\n /**\n * Triggered when a consultation request is accepted\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {\n * console.log('Consultation accepted:', task.data.interactionId);\n * // Begin consultation\n * });\n * ```\n */\n TASK_CONSULT_ACCEPTED = 'task:consultAccepted',\n\n /**\n * Triggered when consultation is in progress\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {\n * console.log('Consulting in progress:', task.data.interactionId);\n * // Handle ongoing consultation\n * });\n * ```\n */\n TASK_CONSULTING = 'task:consulting',\n\n /**\n * Triggered when a new consultation is created\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {\n * console.log('Consultation created:', task.data.interactionId);\n * // Initialize consultation\n * });\n * ```\n */\n TASK_CONSULT_CREATED = 'task:consultCreated',\n\n /**\n * Triggered when a consultation is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {\n * console.log('Consultation offered:', task.data.interactionId);\n * // Handle consultation offer\n * });\n * ```\n */\n TASK_OFFER_CONSULT = 'task:offerConsult',\n\n /**\n * Triggered when a task is completed/terminated\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_END, (task: ITask) => {\n * console.log('Task ended:', task.data.interactionId);\n * // Clean up and finalize task\n * });\n * ```\n */\n TASK_END = 'task:end',\n\n /**\n * Triggered when a task enters wrap-up state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {\n * console.log('Task in wrap-up:', task.data.interactionId);\n * // Begin wrap-up process\n * });\n * ```\n */\n TASK_WRAPUP = 'task:wrapup',\n\n /**\n * Triggered when task wrap-up is completed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {\n * console.log('Task wrapped up:', task.data.interactionId);\n * // Finalize task completion\n * });\n * ```\n */\n TASK_WRAPPEDUP = 'task:wrappedup',\n\n /**\n * Triggered when recording is paused\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {\n * console.log('Recording paused:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_PAUSED = 'task:recordingPaused',\n\n /**\n * Triggered when recording pause attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {\n * console.log('Recording pause failed:', task.data.interactionId);\n * // Handle pause failure\n * });\n * ```\n */\n TASK_RECORDING_PAUSE_FAILED = 'task:recordingPauseFailed',\n\n /**\n * Triggered when recording is resumed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {\n * console.log('Recording resumed:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_RESUMED = 'task:recordingResumed',\n\n /**\n * Triggered when recording resume attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {\n * console.log('Recording resume failed:', task.data.interactionId);\n * // Handle resume failure\n * });\n * ```\n */\n TASK_RECORDING_RESUME_FAILED = 'task:recordingResumeFailed',\n\n /**\n * Triggered when a task is rejected/unanswered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {\n * console.log('Task rejected:', task.data.interactionId);\n * // Handle task rejection\n * });\n * ```\n */\n TASK_REJECT = 'task:rejected',\n\n /**\n * Triggered when an outdial call fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OUTDIAL_FAILED, (reason: string) => {\n * console.log('Outdial failed:', reason);\n * // Handle outdial failure\n * });\n * ```\n */\n TASK_OUTDIAL_FAILED = 'task:outdialFailed',\n\n /**\n * Triggered when a task is populated with data\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HYDRATE, (task: ITask) => {\n * console.log('Task hydrated:', task.data.interactionId);\n * // Process task data\n * });\n * ```\n */\n TASK_HYDRATE = 'task:hydrate',\n\n /**\n * Triggered when a new contact is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONTACT, (task: ITask) => {\n * console.log('Contact offered:', task.data.interactionId);\n * // Handle contact offer\n * });\n * ```\n */\n TASK_OFFER_CONTACT = 'task:offerContact',\n\n /**\n * Triggered when a task has been successfully auto-answered\n * This event is emitted after the SDK automatically accepts a task due to:\n * - WebRTC calls with auto-answer enabled\n * - Agent-initiated outdial calls\n * - Other auto-answer scenarios\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_AUTO_ANSWERED, (task: ITask) => {\n * console.log('Task auto-answered:', task.data.interactionId);\n * // Update UI - enable cancel button, etc.\n * });\n * ```\n */\n TASK_AUTO_ANSWERED = 'task:autoAnswered',\n\n /**\n * Triggered when a conference is being established\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_ESTABLISHING, (task: ITask) => {\n * console.log('Conference establishing:', task.data.interactionId);\n * // Handle conference setup in progress\n * });\n * ```\n */\n TASK_CONFERENCE_ESTABLISHING = 'task:conferenceEstablishing',\n\n /**\n * Triggered when a conference is started successfully\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_STARTED, (task: ITask) => {\n * console.log('Conference started:', task.data.interactionId);\n * // Handle conference start\n * });\n * ```\n */\n TASK_CONFERENCE_STARTED = 'task:conferenceStarted',\n\n /**\n * Triggered when a conference fails to start\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_FAILED, (task: ITask) => {\n * console.log('Conference failed:', task.data.interactionId);\n * // Handle conference failure\n * });\n * ```\n */\n TASK_CONFERENCE_FAILED = 'task:conferenceFailed',\n\n /**\n * Triggered when a conference is ended successfully\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_ENDED, (task: ITask) => {\n * console.log('Conference ended:', task.data.interactionId);\n * // Handle conference end\n * });\n * ```\n */\n TASK_CONFERENCE_ENDED = 'task:conferenceEnded',\n\n /**\n * Triggered when a participant joins the conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_JOINED, (task: ITask) => {\n * console.log('Participant joined conference:', task.data.interactionId);\n * // Handle participant joining\n * });\n * ```\n */\n TASK_PARTICIPANT_JOINED = 'task:participantJoined',\n\n /**\n * Triggered when a participant leaves the conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT, (task: ITask) => {\n * console.log('Participant left conference:', task.data.interactionId);\n * // Handle participant leaving\n * });\n * ```\n */\n TASK_PARTICIPANT_LEFT = 'task:participantLeft',\n\n /**\n * Triggered when conference transfer is successful\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFERRED, (task: ITask) => {\n * console.log('Conference transferred:', task.data.interactionId);\n * // Handle successful conference transfer\n * });\n * ```\n */\n TASK_CONFERENCE_TRANSFERRED = 'task:conferenceTransferred',\n\n /**\n * Triggered when conference transfer fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_TRANSFER_FAILED, (task: ITask) => {\n * console.log('Conference transfer failed:', task.data.interactionId);\n * // Handle failed conference transfer\n * });\n * ```\n */\n TASK_CONFERENCE_TRANSFER_FAILED = 'task:conferenceTransferFailed',\n\n /**\n * Triggered when ending a conference fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONFERENCE_END_FAILED, (task: ITask) => {\n * console.log('Conference end failed:', task.data.interactionId);\n * // Handle failed conference end\n * });\n * ```\n */\n TASK_CONFERENCE_END_FAILED = 'task:conferenceEndFailed',\n\n /**\n * Triggered when participant exit from conference fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_PARTICIPANT_LEFT_FAILED, (task: ITask) => {\n * console.log('Participant failed to leave conference:', task.data.interactionId);\n * // Handle failed participant exit\n * });\n * ```\n */\n TASK_PARTICIPANT_LEFT_FAILED = 'task:participantLeftFailed',\n\n /**\n * Triggered when a contact is merged\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MERGED, (task: ITask) => {\n * console.log('Contact merged:', task.data.interactionId);\n * // Handle contact merge\n * });\n * ```\n */\n TASK_MERGED = 'task:merged',\n\n /**\n * Triggered when a participant enters post-call activity state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_POST_CALL_ACTIVITY, (task: ITask) => {\n * console.log('Participant in post-call activity:', task.data.interactionId);\n * // Handle post-call activity\n * });\n * ```\n */\n TASK_POST_CALL_ACTIVITY = 'task:postCallActivity',\n\n /**\n * Triggered when a campaign preview contact is offered to the agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CAMPAIGN_PREVIEW_RESERVATION, (data: AgentContact) => {\n * console.log('Campaign preview contact received:', data.interactionId);\n * // Handle campaign preview reservation\n * });\n * ```\n */\n TASK_CAMPAIGN_PREVIEW_RESERVATION = 'task:campaignPreviewReservation',\n}\n\n/**\n * Represents a customer interaction within the contact center system\n * Contains comprehensive details about an ongoing customer interaction\n * @public\n */\nexport type Interaction = {\n /** Indicates if the interaction is managed by Flow Control */\n isFcManaged: boolean;\n /** Indicates if the interaction has been terminated */\n isTerminated: boolean;\n /** The type of media channel for this interaction */\n mediaType: MEDIA_CHANNEL;\n /** List of previous virtual teams that handled this interaction */\n previousVTeams: string[];\n /** Current state of the interaction */\n state: string;\n /** Current virtual team handling the interaction */\n currentVTeam: string;\n /** List of participants in the interaction */\n participants: any; // TODO: Define specific participant type\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Timestamp when the interaction was created */\n createdTimestamp?: number;\n /** Indicates if wrap-up assistance is enabled */\n isWrapUpAssist?: boolean;\n /** Detailed call processing information and metadata */\n callProcessingDetails: {\n /** Name of the Queue Manager handling this interaction */\n QMgrName: string;\n /** Indicates if the task should be self-serviced */\n taskToBeSelfServiced: string;\n /** Automatic Number Identification (caller's number) */\n ani: string;\n /** Display version of the ANI */\n displayAni: string;\n /** Dialed Number Identification Service number */\n dnis: string;\n /** Tenant identifier */\n tenantId: string;\n /** Queue identifier */\n QueueId: string;\n /** Virtual team identifier */\n vteamId: string;\n /** Indicates if pause/resume functionality is enabled */\n pauseResumeEnabled?: string;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Indicates if the interaction is currently paused */\n isPaused?: string;\n /** Indicates if recording is in progress */\n recordInProgress?: string;\n /** Indicates if recording has started */\n recordingStarted?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: string;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: string;\n /** IVR conversation transcript */\n convIvrTranscript?: string;\n /** Customer's name */\n customerName: string;\n /** Name of the virtual team */\n virtualTeamName: string;\n /** RONA (Redirection on No Answer) timeout in seconds */\n ronaTimeout: string;\n /** Category of the interaction */\n category: string;\n /** Reason for the interaction */\n reason: string;\n /** Source number for the interaction */\n sourceNumber: string;\n /** Source page that initiated the interaction */\n sourcePage: string;\n /** Application user identifier */\n appUser: string;\n /** Customer's contact number */\n customerNumber: string;\n /** Code indicating the reason for interaction */\n reasonCode: string;\n /** Path taken through the IVR system */\n IvrPath: string;\n /** Identifier for the IVR path */\n pathId: string;\n /** Email address or contact point that initiated the interaction */\n fromAddress: string;\n /** Identifier of the parent interaction for related interactions */\n parentInteractionId?: string;\n /** Identifier of the child interaction for related interactions */\n childInteractionId?: string;\n /** Type of relationship between parent and child interactions */\n relationshipType?: string;\n /** ANI of the parent interaction */\n parent_ANI?: string;\n /** DNIS of the parent interaction */\n parent_DNIS?: string;\n /** Indicates if the consulted destination agent has joined */\n consultDestinationAgentJoined?: boolean | string;\n /** Name of the destination agent for consultation */\n consultDestinationAgentName?: string;\n /** DN of the parent interaction's agent */\n parent_Agent_DN?: string;\n /** Name of the parent interaction's agent */\n parent_Agent_Name?: string;\n /** Team name of the parent interaction's agent */\n parent_Agent_TeamName?: string;\n /** Indicates if the interaction is in conference mode */\n isConferencing?: string;\n /** Type of monitoring being performed */\n monitorType?: string;\n /** Name of the workflow being executed */\n workflowName?: string;\n /** Identifier of the workflow */\n workflowId?: string;\n /** Indicates if monitoring is in invisible mode */\n monitoringInvisibleMode?: string;\n /** Identifier for the monitoring request */\n monitoringRequestId?: string;\n /** Timeout for participant invitation */\n participantInviteTimeout?: string;\n /** Filename for music on hold */\n mohFileName?: string;\n /** Flag for continuing recording during transfer */\n CONTINUE_RECORDING_ON_TRANSFER?: string;\n /** Entry point identifier */\n EP_ID?: string;\n /** Type of routing being used */\n ROUTING_TYPE?: string;\n /** Events registered with Flow Control Engine */\n fceRegisteredEvents?: string;\n /** Indicates if the interaction is parked */\n isParked?: string;\n /** Priority level of the interaction */\n priority?: string;\n /** Identifier for the routing strategy */\n routingStrategyId?: string;\n /** Current state of monitoring */\n monitoringState?: string;\n /** Indicates if blind transfer is in progress */\n BLIND_TRANSFER_IN_PROGRESS?: boolean;\n /** Desktop view configuration for Flow Control */\n fcDesktopView?: string;\n /** Agent ID who initiated the outdial call */\n outdialAgentId?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Media-specific information for the interaction */\n media: Record<\n string,\n {\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of media channel */\n mediaType: MEDIA_CHANNEL;\n /** Media manager handling this media */\n mediaMgr: string;\n /** List of participant identifiers */\n participants: string[];\n /** Type of media */\n mType: string;\n /** Indicates if media is on hold */\n isHold: boolean;\n /** Timestamp when media was put on hold */\n holdTimestamp: number | null;\n }\n >;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: MEDIA_CHANNEL;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Parameters passed through the call flow */\n callFlowParams: Record<\n string,\n {\n /** Name of the parameter */\n name: string;\n /** Qualifier for the parameter */\n qualifier: string;\n /** Description of the parameter */\n description: string;\n /** Data type of the parameter value */\n valueDataType: string;\n /** Value of the parameter */\n value: string;\n }\n >;\n};\n\n/**\n * Task payload containing detailed information about a contact center task\n * This structure encapsulates all relevant data for task management\n * @public\n */\nexport type TaskData = {\n /** Unique identifier for the media resource handling this task */\n mediaResourceId: string;\n /** Type of event that triggered this task data */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Identifier of the agent handling the task */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the task */\n trackingId: string;\n /** Media resource identifier for consultation operations */\n consultMediaResourceId: string;\n /** Detailed interaction information */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the task is from the owner */\n fromOwner?: boolean;\n /** Indicates if the task is to the owner */\n toOwner?: boolean;\n /** Identifier for child interaction in consult/transfer scenarios */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the task */\n owner: string;\n /** Queue manager handling the task */\n queueMgr: string;\n /** Name of the queue where task is queued */\n queueName?: string;\n /** Type of the task */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the task is in consultation state */\n isConsulted?: boolean;\n /** Indicates if the task is in conference state */\n isConferencing: boolean;\n /** Indicates if a conference is currently in progress (2+ active agents) */\n isConferenceInProgress?: boolean;\n /** Identifier of agent who last updated the task */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the task was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including state and media information */\n task?: Interaction;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel (used for campaign tasks) */\n reservedAgentChannelId?: string;\n /** Indicates if wrap-up is required for this task */\n wrapUpRequired?: boolean;\n /** Indicates if auto-answer is in progress for this task */\n isAutoAnswering?: boolean;\n /** Indicates if wrap-up is required for this task */\n agentsPendingWrapUp?: string[];\n};\n\n/**\n * Type representing an agent contact message within the contact center system\n * Contains comprehensive interaction and task related details for agent operations\n * @public\n */\nexport type AgentContact = Msg<{\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of the event (e.g., 'AgentDesktopMessage') */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Unique identifier of the agent handling the contact */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the contact */\n trackingId: string;\n /** Media resource identifier for consult operations */\n consultMediaResourceId: string;\n /** Detailed interaction information including media and participant data */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the message is from the owner of the interaction */\n fromOwner?: boolean;\n /** Indicates if the message is to the owner of the interaction */\n toOwner?: boolean;\n /** Identifier for child interaction in case of consult/transfer */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the interaction */\n owner: string;\n /** Queue manager handling the interaction */\n queueMgr: string;\n /** Name of the queue where interaction is queued */\n queueName?: string;\n /** Type of the contact/interaction */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the interaction is in consult state */\n isConsulted?: boolean;\n /** Indicates if the interaction is in conference state */\n isConferencing: boolean;\n /** Identifier of the agent who last updated the interaction */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the interaction was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including media and state information */\n task?: Interaction;\n /** Identifier of the supervisor monitoring the interaction */\n supervisorId?: string;\n /** Type of monitoring (e.g., 'SILENT', 'BARGE_IN') */\n monitorType?: string;\n /** Dial number of the supervisor */\n supervisorDN?: string;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel */\n reservedAgentChannelId?: string;\n /** Current monitoring state information */\n monitoringState?: {\n /** Type of monitoring state */\n type: string;\n };\n /** Name of the supervisor monitoring the interaction */\n supervisorName?: string;\n}>;\n\n/**\n * Information about a virtual team in the contact center\n * @ignore\n */\nexport type VTeam = {\n /** Profile ID of the agent in the virtual team */\n agentProfileId: string;\n /** Session ID of the agent in the virtual team */\n agentSessionId: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Type of the virtual team */\n type: string;\n /** Optional tracking identifier */\n trackingId?: string;\n};\n\n/**\n * Detailed information about a virtual team configuration\n * @ignore\n */\nexport type VteamDetails = {\n /** Name of the virtual team */\n name: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Unique identifier for the virtual team */\n id: string;\n /** Type of the virtual team */\n type: string;\n /** ID of the analyzer associated with the team */\n analyzerId: string;\n};\n\n/**\n * Response type for successful virtual team operations\n * Contains details about virtual teams and their capabilities\n * @ignore\n */\nexport type VTeamSuccess = Msg<{\n /** Response data containing team information */\n data: {\n /** List of virtual team details */\n vteamList: Array<VteamDetails>;\n /** Whether queue consultation is allowed */\n allowConsultToQueue: boolean;\n };\n /** Method name from JavaScript */\n jsMethod: string;\n /** Data related to the call */\n callData: string;\n /** Session ID of the agent */\n agentSessionId: string;\n}>;\n\n/**\n * Parameters for putting a task on hold or resuming from hold\n * @public\n */\nexport type HoldResumePayload = {\n /** Unique identifier for the media resource to hold/resume */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for resuming a task's recording\n * @public\n */\nexport type ResumeRecordingPayload = {\n /** Indicates if the recording was automatically resumed */\n autoResumed: boolean;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayLoad = {\n /** Destination identifier where the task will be transferred to */\n to: string;\n /** Type of the destination (queue, agent, etc.) */\n destinationType: DestinationType;\n};\n\n/**\n * Parameters for initiating a consultative transfer\n * @public\n */\nexport type ConsultTransferPayLoad = {\n /** Destination identifier for the consultation transfer */\n to: string;\n /** Type of the consultation transfer destination */\n destinationType: ConsultTransferDestinationType;\n};\n\n/**\n * Parameters for initiating a consultation with another agent or queue\n * @public\n */\nexport type ConsultPayload = {\n /** Destination identifier for the consultation */\n to: string | undefined;\n /** Type of the consultation destination (agent, queue, etc.) */\n destinationType: DestinationType;\n /** Whether to hold other participants during consultation (always true) */\n holdParticipants?: boolean;\n};\n\n/**\n * Parameters for ending a consultation task\n * @public\n */\nexport type ConsultEndPayload = {\n /** Indicates if this is a consultation operation */\n isConsult: boolean;\n /** Indicates if this involves a secondary entry point or DN agent */\n isSecondaryEpDnAgent?: boolean;\n /** Optional queue identifier for the consultation */\n queueId?: string;\n /** Identifier of the task being consulted */\n taskId: string;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayload = {\n /** Destination identifier where the task will be transferred */\n to: string | undefined;\n /** Type of the transfer destination */\n destinationType: DestinationType;\n};\n\n/**\n * API payload for ending a consultation\n * This is the actual payload that is sent to the developer API\n * @public\n */\nexport type ConsultEndAPIPayload = {\n /** Optional identifier of the queue involved in the consultation */\n queueId?: string;\n};\n\n/**\n * Data required for consulting and conferencing operations\n * @public\n */\nexport type ConsultConferenceData = {\n /** Identifier of the agent initiating consult/conference */\n agentId?: string;\n /** Target destination for the consult/conference */\n to: string | undefined;\n /** Type of destination (e.g., 'agent', 'queue') */\n destinationType: string;\n};\n\n/**\n * Parameters required for cancelling a consult to queue operation\n * @public\n */\nexport type cancelCtq = {\n /** Identifier of the agent cancelling the CTQ */\n agentId: string;\n /** Identifier of the queue where consult was initiated */\n queueId: string;\n};\n\n/**\n * Parameters required for declining a task\n * @public\n */\nexport type declinePayload = {\n /** Identifier of the media resource to decline */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for wrapping up a task with relevant completion details\n * @public\n */\nexport type WrapupPayLoad = {\n /** The reason provided for wrapping up the task */\n wrapUpReason: string;\n /** Auxiliary code identifier associated with the wrap-up state */\n auxCodeId: string;\n};\n\n/**\n * Configuration parameters for initiating outbound dialer tasks\n * @public\n */\nexport type DialerPayload = {\n /** An entryPointId for respective task */\n entryPointId: string;\n /** A valid customer DN, on which the response is expected, maximum length 36 characters */\n destination: string;\n /** The direction of the call */\n direction: 'OUTBOUND';\n /** Schema-free data tuples to pass specific data based on outboundType (max 30 tuples) */\n attributes: {[key: string]: string};\n /** The media type for the request */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n /** The outbound type for the task */\n outboundType: 'OUTDIAL' | 'CALLBACK' | 'EXECUTE_FLOW';\n /** The Outdial ANI number that will be used while making a call to the customer. */\n origin: string;\n};\n\n/**\n * Payload for campaign preview contact operations (accept, skip, remove)\n * @public\n */\nexport type PreviewContactPayload = {\n /** The interaction ID from the campaign reservation */\n interactionId: string;\n /** The campaign name (not a UUID). Available from the reservation event at\n * `task.data.interaction.callProcessingDetails.campaignId` or `task.data.campaignId`. */\n campaignId: string;\n};\n\n/**\n * Data structure for cleaning up contact resources\n * @public\n */\nexport type ContactCleanupData = {\n /** Type of cleanup operation being performed */\n type: string;\n /** Organization identifier where cleanup is occurring */\n orgId: string;\n /** Identifier of the agent associated with the contacts */\n agentId: string;\n /** Detailed data about the cleanup operation */\n data: {\n /** Type of event that triggered the cleanup */\n eventType: string;\n /** Identifier of the interaction being cleaned up */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Media manager handling the cleanup */\n mediaMgr: string;\n /** Tracking identifier for the cleanup operation */\n trackingId: string;\n /** Type of media being cleaned up */\n mediaType: string;\n /** Optional destination information */\n destination?: string;\n /** Whether this is a broadcast cleanup */\n broadcast: boolean;\n /** Type of cleanup being performed */\n type: string;\n };\n};\n\n/**\n * Response type for task public methods\n * Can be an {@link AgentContact} object containing updated task state,\n * an Error in case of failure, or void for operations that don't return data\n * @public\n */\nexport type TaskResponse = AgentContact | Error | void;\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends EventEmitter to support event-driven task updates\n */\nexport interface ITask extends EventEmitter {\n /**\n * Event data received in the Contact Center events.\n * Contains detailed task information including interaction details, media resources,\n * and participant data as defined in {@link TaskData}\n */\n data: TaskData;\n\n /**\n * Map associating tasks with their corresponding call identifiers.\n */\n webCallMap: Record<TaskId, CallId>;\n\n /**\n * Auto-wrapup timer for the task\n * This is used to automatically wrap up tasks after a specified duration\n * as defined in {@link AutoWrapup}\n */\n autoWrapup?: AutoWrapup;\n\n /**\n * Cancels the auto-wrapup timer for the task.\n * This method stops the auto-wrapup process if it is currently active.\n * Note: This is supported only in single session mode. Not supported in multi-session mode.\n * @returns void\n */\n cancelAutoWrapupTimer(): void;\n\n /**\n * Deregisters all web call event listeners.\n * Used when cleaning up task resources.\n * @ignore\n */\n unregisterWebCallListeners(): void;\n\n /**\n * Updates the task data with new information\n * @param newData - Updated task data to apply, must conform to {@link TaskData} structure\n * @returns Updated task instance\n * @ignore\n */\n updateTaskData(newData: TaskData): ITask;\n\n /**\n * Answers or accepts an incoming task.\n * Once accepted, the task will be assigned to the agent and trigger a {@link TASK_EVENTS.TASK_ASSIGNED} event.\n * The response will contain updated agent contact information as defined in {@link AgentContact}.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.accept();\n * ```\n */\n accept(): Promise<TaskResponse>;\n\n /**\n * Declines an incoming task for Browser Login\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n\n /**\n * Places the current task on hold.\n * @param mediaResourceId - Optional media resource ID to use for the hold operation. If not provided, uses the task's current mediaResourceId\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * // Hold with default mediaResourceId\n * await task.hold();\n *\n * // Hold with custom mediaResourceId\n * await task.hold('custom-media-resource-id');\n * ```\n */\n hold(mediaResourceId?: string): Promise<TaskResponse>;\n\n /**\n * Resumes a task that was previously on hold.\n * @param mediaResourceId - Optional media resource ID to use for the resume operation. If not provided, uses the task's current mediaResourceId from interaction media\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * // Resume with default mediaResourceId\n * await task.resume();\n *\n * // Resume with custom mediaResourceId\n * await task.resume('custom-media-resource-id');\n * ```\n */\n resume(mediaResourceId?: string): Promise<TaskResponse>;\n\n /**\n * Ends/terminates the current task.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.end();\n * ```\n */\n end(): Promise<TaskResponse>;\n\n /**\n * Initiates wrap-up process for the task with specified details.\n * @param wrapupPayload - Wrap-up details including reason and auxiliary code\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.wrapup({\n * wrapUpReason: \"Customer issue resolved\",\n * auxCodeId: \"RESOLVED\"\n * });\n * ```\n */\n wrapup(wrapupPayload: WrapupPayLoad): Promise<TaskResponse>;\n\n /**\n * Pauses the recording for current task.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.pauseRecording();\n * ```\n */\n pauseRecording(): Promise<TaskResponse>;\n\n /**\n * Resumes a previously paused recording.\n * @param resumeRecordingPayload - Parameters for resuming the recording\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.resumeRecording({\n * autoResumed: false\n * });\n * ```\n */\n resumeRecording(resumeRecordingPayload: ResumeRecordingPayload): Promise<TaskResponse>;\n\n /**\n * Initiates a consultation with another agent or queue.\n * @param consultPayload - Consultation details including destination and type\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consult({ to: \"agentId\", destinationType: \"agent\" });\n * ```\n */\n consult(consultPayload: ConsultPayload): Promise<TaskResponse>;\n\n /**\n * Ends an ongoing consultation.\n * @param consultEndPayload - Details for ending the consultation\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.endConsult({ isConsult: true, taskId: \"taskId\" });\n * ```\n */\n endConsult(consultEndPayload: ConsultEndPayload): Promise<TaskResponse>;\n\n /**\n * Transfers the task to another agent or queue.\n * @param transferPayload - Transfer details including destination and type\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.transfer({ to: \"queueId\", destinationType: \"queue\" });\n * ```\n */\n transfer(transferPayload: TransferPayLoad): Promise<TaskResponse>;\n\n /**\n * Transfers the task after consultation.\n * @param consultTransferPayload - Details for consult transfer (optional)\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consultTransfer({ to: \"agentId\", destinationType: \"agent\" });\n * ```\n */\n consultTransfer(consultTransferPayload?: ConsultTransferPayLoad): Promise<TaskResponse>;\n\n /**\n * Initiates a consult conference (merge consult call with main call).\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.consultConference();\n * ```\n */\n consultConference(): Promise<TaskResponse>;\n\n /**\n * Exits from an ongoing conference.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.exitConference();\n * ```\n */\n exitConference(): Promise<TaskResponse>;\n\n /**\n * Transfers the conference to another participant.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.transferConference();\n * ```\n */\n transferConference(): Promise<TaskResponse>;\n\n /**\n * Toggles mute/unmute for the local audio stream during a WebRTC task.\n * @returns Promise<void>\n * @example\n * ```typescript\n * await task.toggleMute();\n * ```\n */\n toggleMute(): Promise<void>;\n}\n"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9B;EACAE,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMC,iCAAiC,GAAAL,OAAA,CAAAK,iCAAA,GAAG;EAC/C;EACAF,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAF,UAAU,EAAE,YAAY;EACxB;EACAD,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMK,aAAa,GAAAN,OAAA,CAAAM,aAAA,GAAG;EAC3B;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,MAAM,EAAE,QAAQ;EAChB;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAAd,OAAA,CAAAc,WAAA,0BAAXA,WAAW;EACrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAVYA,WAAW;EAarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtBYA,WAAW;EAyBrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjCYA,WAAW;EAoCrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7CYA,WAAW;EAgDrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzDYA,WAAW;EA4DrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArEYA,WAAW;EAwErB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjFYA,WAAW;EAoFrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7FYA,WAAW;EAgGrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzGYA,WAAW;EA4GrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArHYA,WAAW;EAwHrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjIYA,WAAW;EAoIrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7IYA,WAAW;EAgJrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzJYA,WAAW;EA4JrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArKYA,WAAW;EAwKrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjLYA,WAAW;EAoLrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7LYA,WAAW;EAgMrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzMYA,WAAW;EA4MrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArNYA,WAAW;EAwNrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjOYA,WAAW;EAoOrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7OYA,WAAW;EAgPrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzPYA,WAAW;EA4PrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArQYA,WAAW;EAwQrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjRYA,WAAW;EAoRrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7RYA,WAAW;EAgSrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7SYA,WAAW;EAgTrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzTYA,WAAW;EA4TrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArUYA,WAAW;EAwUrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjVYA,WAAW;EAoVrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7VYA,WAAW;EAgWrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzWYA,WAAW;EA4WrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EArXYA,WAAW;EAwXrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjYYA,WAAW;EAoYrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7YYA,WAAW;EAgZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzZYA,WAAW;EA4ZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAraYA,WAAW;EAwarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjbYA,WAAW;EAobrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7bYA,WAAW;EAgcrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzcYA,WAAW;EAAA,OAAXA,WAAW;AAAA;AA6cvB;AACA;AACA;AACA;AACA;AA+LA;AACA;AACA;AACA;AACA;AA8EA;AACA;AACA;AACA;AACA;AAmFA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AA+BA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA","ignoreList":[]}
|
package/dist/types/cc.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { SetStateResponse, IContactCenter, AgentLogin, AgentProfileUpdate, Stati
|
|
|
10
10
|
import LoggerProxy from './logger-proxy';
|
|
11
11
|
import { StateChange, Logout } from './services/agent/types';
|
|
12
12
|
import { Profile, OutdialAniEntriesResponse, OutdialAniParams } from './services/config/types';
|
|
13
|
-
import { TaskResponse } from './services/task/types';
|
|
13
|
+
import { TaskResponse, PreviewContactPayload } from './services/task/types';
|
|
14
14
|
import AddressBook from './services/AddressBook';
|
|
15
15
|
import type { EntryPointListResponse, EntryPointSearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from './types';
|
|
16
16
|
/**
|
|
@@ -63,6 +63,7 @@ import type { EntryPointListResponse, EntryPointSearchParams, ContactServiceQueu
|
|
|
63
63
|
* - `task:established` - Task/call has been connected
|
|
64
64
|
* - `task:ended` - Task/call has ended
|
|
65
65
|
* - `task:error` - An error occurred during task handling
|
|
66
|
+
* - `task:campaignPreviewReservation` - Campaign preview contact offered to agent
|
|
66
67
|
*
|
|
67
68
|
* @public
|
|
68
69
|
*
|
|
@@ -280,6 +281,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
280
281
|
* @param {ITask} task The task object that has been merged
|
|
281
282
|
*/
|
|
282
283
|
private handleTaskMerged;
|
|
284
|
+
/**
|
|
285
|
+
* Handles campaign preview reservation events when a contact is offered to the agent
|
|
286
|
+
* @private
|
|
287
|
+
* @param {ITask} task The campaign reservation task
|
|
288
|
+
*/
|
|
289
|
+
private handleCampaignPreviewReservation;
|
|
283
290
|
/**
|
|
284
291
|
* Sets up event listeners for incoming tasks and task hydration
|
|
285
292
|
* Subscribes to task events from the task manager
|
|
@@ -651,6 +658,29 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
651
658
|
* ```
|
|
652
659
|
*/
|
|
653
660
|
startOutdial(destination: string, origin: string): Promise<TaskResponse>;
|
|
661
|
+
/**
|
|
662
|
+
* Accepts a campaign preview contact, initiating the outbound call.
|
|
663
|
+
*
|
|
664
|
+
* When a campaign manager reserves a contact for an agent, the agent receives an
|
|
665
|
+
* `AgentOfferCampaignReservation` event. The agent can then accept the preview contact
|
|
666
|
+
* to initiate the outbound call.
|
|
667
|
+
*
|
|
668
|
+
* @param {PreviewContactPayload} payload - The preview contact payload containing interactionId and campaignId (campaign name, not UUID).
|
|
669
|
+
* @returns {Promise<TaskResponse>} Promise resolving with agent contact on success.
|
|
670
|
+
* @throws {Error} If the operation fails (network error, customer unavailable, etc.)
|
|
671
|
+
*
|
|
672
|
+
* @example
|
|
673
|
+
* ```typescript
|
|
674
|
+
* webex.cc.on('task:campaignPreviewReservation', async (task) => {
|
|
675
|
+
* const { interactionId } = task.data;
|
|
676
|
+
* // campaignId is the campaign name (e.g. "MyCampaign"), not a UUID
|
|
677
|
+
* const campaignId = task.data.interaction.callProcessingDetails.campaignId;
|
|
678
|
+
*
|
|
679
|
+
* const result = await webex.cc.acceptPreviewContact({ interactionId, campaignId });
|
|
680
|
+
* });
|
|
681
|
+
* ```
|
|
682
|
+
*/
|
|
683
|
+
acceptPreviewContact(payload: PreviewContactPayload): Promise<TaskResponse>;
|
|
654
684
|
/**
|
|
655
685
|
* Fetches outdial ANI (Automatic Number Identification) entries for an outdial ANI ID.
|
|
656
686
|
*
|
|
@@ -139,6 +139,8 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
139
139
|
readonly QUEUE_FETCH_FAILED: "Queue Fetch Failed";
|
|
140
140
|
readonly OUTDIAL_ANI_EP_FETCH_SUCCESS: "Outdial ANI Entries Fetch Success";
|
|
141
141
|
readonly OUTDIAL_ANI_EP_FETCH_FAILED: "Outdial ANI Entries Fetch Failed";
|
|
142
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_SUCCESS: "Campaign Preview Accept Success";
|
|
143
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "Campaign Preview Accept Failed";
|
|
142
144
|
};
|
|
143
145
|
/**
|
|
144
146
|
* Represents the possible metric event names used within the metrics system.
|
|
@@ -104,6 +104,12 @@ export declare const CC_TASK_EVENTS: {
|
|
|
104
104
|
readonly AGENT_CONTACT_UNASSIGNED: "AgentContactUnassigned";
|
|
105
105
|
/** Event emitted when inviting agent fails */
|
|
106
106
|
readonly AGENT_INVITE_FAILED: "AgentInviteFailed";
|
|
107
|
+
/** Event emitted when a campaign preview contact is offered to the agent */
|
|
108
|
+
readonly AGENT_OFFER_CAMPAIGN_RESERVATION: "AgentOfferCampaignReservation";
|
|
109
|
+
/** Event emitted when campaign contact is updated */
|
|
110
|
+
readonly CAMPAIGN_CONTACT_UPDATED: "CampaignContactUpdated";
|
|
111
|
+
/** Event emitted when accepting a campaign preview contact fails */
|
|
112
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "CampaignPreviewAcceptFailed";
|
|
107
113
|
};
|
|
108
114
|
/**
|
|
109
115
|
* Events emitted on Contact Center agent operations
|
|
@@ -253,6 +259,12 @@ export declare const CC_EVENTS: {
|
|
|
253
259
|
readonly AGENT_CONTACT_UNASSIGNED: "AgentContactUnassigned";
|
|
254
260
|
/** Event emitted when inviting agent fails */
|
|
255
261
|
readonly AGENT_INVITE_FAILED: "AgentInviteFailed";
|
|
262
|
+
/** Event emitted when a campaign preview contact is offered to the agent */
|
|
263
|
+
readonly AGENT_OFFER_CAMPAIGN_RESERVATION: "AgentOfferCampaignReservation";
|
|
264
|
+
/** Event emitted when campaign contact is updated */
|
|
265
|
+
readonly CAMPAIGN_CONTACT_UPDATED: "CampaignContactUpdated";
|
|
266
|
+
/** Event emitted when accepting a campaign preview contact fails */
|
|
267
|
+
readonly CAMPAIGN_PREVIEW_ACCEPT_FAILED: "CampaignPreviewAcceptFailed";
|
|
256
268
|
/** Welcome event when agent connects to websocket/backend */
|
|
257
269
|
readonly WELCOME: "Welcome";
|
|
258
270
|
/** Event emitted when agent re-login is successful */
|
|
@@ -65,6 +65,8 @@ export type TaskErrorIds = {
|
|
|
65
65
|
'Service.aqm.task.resumeRecording': Failure;
|
|
66
66
|
} | {
|
|
67
67
|
'Service.aqm.dialer.startOutdial': Failure;
|
|
68
|
+
} | {
|
|
69
|
+
'Service.aqm.dialer.acceptPreviewContact': Failure;
|
|
68
70
|
} | {
|
|
69
71
|
'Service.reqs.generic.failure': {
|
|
70
72
|
trackingId: string;
|
|
@@ -6,11 +6,60 @@ export default class AqmReqs {
|
|
|
6
6
|
private webexRequest;
|
|
7
7
|
private webSocketManager;
|
|
8
8
|
constructor(webSocketManager: WebSocketManager);
|
|
9
|
+
/**
|
|
10
|
+
* Creates a request function for an API call with parameters
|
|
11
|
+
* @param c - The configuration for the request
|
|
12
|
+
* @returns A function that makes the API request
|
|
13
|
+
*/
|
|
9
14
|
req<TRes, TErr, TReq>(c: Conf<TRes, TErr, TReq>): Res<TRes, TReq>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a request function for an API call with no parameters
|
|
17
|
+
* @param c - The configuration for the request
|
|
18
|
+
* @returns A function that makes the API request
|
|
19
|
+
*/
|
|
10
20
|
reqEmpty<TRes, TErr>(c: ConfEmpty<TRes, TErr>): ResEmpty<TRes>;
|
|
21
|
+
/**
|
|
22
|
+
* Makes an API request
|
|
23
|
+
* @param c - The request configuration
|
|
24
|
+
* @param cbRes - The callback for the response
|
|
25
|
+
* @returns A promise that resolves with the response or rejects with an error
|
|
26
|
+
*/
|
|
11
27
|
private makeAPIRequest;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a promise for an API request
|
|
30
|
+
* @param c - The request configuration
|
|
31
|
+
* @param cbRes - The callback for the response
|
|
32
|
+
* @returns A promise that resolves with the response or rejects with an error
|
|
33
|
+
*/
|
|
12
34
|
private createPromise;
|
|
35
|
+
/**
|
|
36
|
+
* Converts a bind object to a string representation
|
|
37
|
+
* @param bind - The bind object to convert
|
|
38
|
+
* @returns A string representation of the bind object
|
|
39
|
+
*/
|
|
13
40
|
private bindPrint;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if a message matches a bind object
|
|
43
|
+
* @param bind - The bind object to check against
|
|
44
|
+
* @param msg - The message to check
|
|
45
|
+
* @returns True if the message matches the bind object, false otherwise
|
|
46
|
+
*/
|
|
14
47
|
private bindCheck;
|
|
48
|
+
/**
|
|
49
|
+
* Checks type-dependent field conditions defined in __typeMap.
|
|
50
|
+
* @param typeMap - The type map to check against
|
|
51
|
+
* @param msg - The message to check
|
|
52
|
+
* @returns True if the message matches the type map, false otherwise
|
|
53
|
+
* The typeMap has the shape:
|
|
54
|
+
* { typeField: "type", conditions: { EventA: { field: value }, EventB: { field: value } } }
|
|
55
|
+
* It reads msg[typeField] to determine which condition set to apply,
|
|
56
|
+
* then verifies all fields in that condition match the message.
|
|
57
|
+
*/
|
|
58
|
+
private static typeMapCheck;
|
|
59
|
+
/**
|
|
60
|
+
* Handles incoming messages from the WebSocket (must be a lambda fn)
|
|
61
|
+
* @param msg - The message to handle
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
15
64
|
private readonly onMessage;
|
|
16
65
|
}
|
|
@@ -82,3 +82,11 @@ export declare const hasAgentInitiatedOutdial: (interaction: Interaction, agentI
|
|
|
82
82
|
* @returns true if task should be auto-answered, false otherwise
|
|
83
83
|
*/
|
|
84
84
|
export declare const shouldAutoAnswerTask: (taskData: TaskData, agentId: string, loginOption: string, webRtcEnabled: boolean) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Checks if a task is a campaign preview reservation that has not yet been accepted.
|
|
87
|
+
* Campaign preview tasks should not trigger incoming call handling until the agent
|
|
88
|
+
* explicitly accepts the preview contact.
|
|
89
|
+
* @param task - The task to check
|
|
90
|
+
* @returns true if the task is a pending campaign preview reservation, false otherwise
|
|
91
|
+
*/
|
|
92
|
+
export declare const isCampaignPreviewReservation: (task: ITask) => boolean;
|
|
@@ -19,6 +19,10 @@ export declare const END = "/end";
|
|
|
19
19
|
export declare const CONSULT_CONFERENCE = "/consult/conference";
|
|
20
20
|
export declare const CONFERENCE_EXIT = "/conference/exit";
|
|
21
21
|
export declare const CONFERENCE_TRANSFER = "/conference/transfer";
|
|
22
|
+
export declare const DIALER_API = "/v1/dialer";
|
|
23
|
+
export declare const CAMPAIGN_PREVIEW_ACCEPT = "/accept";
|
|
24
|
+
/** 80-second timeout for accepting preview contact (outbound call setup takes longer than default 20s) */
|
|
25
|
+
export declare const TIMEOUT_PREVIEW_ACCEPT = 80000;
|
|
22
26
|
export declare const TASK_MANAGER_FILE = "taskManager";
|
|
23
27
|
export declare const TASK_FILE = "task";
|
|
24
28
|
/**
|
|
@@ -25,4 +25,19 @@ export default function aqmDialer(aqm: AqmReqs): {
|
|
|
25
25
|
startOutdial: import("../core/types").Res<Contact.AgentContact, {
|
|
26
26
|
data: Contact.DialerPayload;
|
|
27
27
|
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Accepts a campaign preview contact, initiating the outbound call.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} p - Parameters object.
|
|
32
|
+
* @param {Contact.PreviewContactPayload} p.data - Payload containing interactionId and campaignId.
|
|
33
|
+
* @returns {Promise<Contact.AgentContact>} A promise that resolves with agent contact on success.
|
|
34
|
+
*
|
|
35
|
+
* Emits:
|
|
36
|
+
* - `CC_EVENTS.AGENT_CONTACT_ASSIGNED` on success
|
|
37
|
+
* - `CC_EVENTS.CAMPAIGN_PREVIEW_ACCEPT_FAILED` on failure
|
|
38
|
+
* @ignore
|
|
39
|
+
*/
|
|
40
|
+
acceptPreviewContact: import("../core/types").Res<Contact.AgentContact, {
|
|
41
|
+
data: Contact.PreviewContactPayload;
|
|
42
|
+
}>;
|
|
28
43
|
};
|
|
@@ -492,7 +492,18 @@ export declare enum TASK_EVENTS {
|
|
|
492
492
|
* });
|
|
493
493
|
* ```
|
|
494
494
|
*/
|
|
495
|
-
TASK_POST_CALL_ACTIVITY = "task:postCallActivity"
|
|
495
|
+
TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
|
|
496
|
+
/**
|
|
497
|
+
* Triggered when a campaign preview contact is offered to the agent
|
|
498
|
+
* @example
|
|
499
|
+
* ```typescript
|
|
500
|
+
* task.on(TASK_EVENTS.TASK_CAMPAIGN_PREVIEW_RESERVATION, (data: AgentContact) => {
|
|
501
|
+
* console.log('Campaign preview contact received:', data.interactionId);
|
|
502
|
+
* // Handle campaign preview reservation
|
|
503
|
+
* });
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
TASK_CAMPAIGN_PREVIEW_RESERVATION = "task:campaignPreviewReservation"
|
|
496
507
|
}
|
|
497
508
|
/**
|
|
498
509
|
* Represents a customer interaction within the contact center system
|
|
@@ -1046,6 +1057,17 @@ export type DialerPayload = {
|
|
|
1046
1057
|
/** The Outdial ANI number that will be used while making a call to the customer. */
|
|
1047
1058
|
origin: string;
|
|
1048
1059
|
};
|
|
1060
|
+
/**
|
|
1061
|
+
* Payload for campaign preview contact operations (accept, skip, remove)
|
|
1062
|
+
* @public
|
|
1063
|
+
*/
|
|
1064
|
+
export type PreviewContactPayload = {
|
|
1065
|
+
/** The interaction ID from the campaign reservation */
|
|
1066
|
+
interactionId: string;
|
|
1067
|
+
/** The campaign name (not a UUID). Available from the reservation event at
|
|
1068
|
+
* `task.data.interaction.callProcessingDetails.campaignId` or `task.data.campaignId`. */
|
|
1069
|
+
campaignId: string;
|
|
1070
|
+
};
|
|
1049
1071
|
/**
|
|
1050
1072
|
* Data structure for cleaning up contact resources
|
|
1051
1073
|
* @public
|