@webex/contact-center 3.12.0-task-refactor.10 → 3.12.0-task-refactor.11

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.
@@ -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_CHANNEL_TYPE","VOICE","DIGITAL","VOICE_VARIANT","PSTN","WEBRTC","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type {AnyActorRef} from 'xstate';\nimport {TaskEventPayload} from './state-machine';\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 * Unique identifier for a call in the Webex calling system\n */\nexport type CallId = 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 * Supported task channel types for UI control configuration\n */\nexport const TASK_CHANNEL_TYPE = {\n VOICE: 'voice',\n DIGITAL: 'digital',\n} as const;\n\nexport type TaskChannelType = Enum<typeof TASK_CHANNEL_TYPE>;\n\n/**\n * Voice channel variants that toggle PSTN/WebRTC specific behaviors\n */\nexport const VOICE_VARIANT = {\n PSTN: 'pstn',\n WEBRTC: 'webrtc',\n} as const;\n\nexport type VoiceVariant = Enum<typeof VOICE_VARIANT>;\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 whenever task UI controls are recalculated\n */\n TASK_UI_CONTROLS_UPDATED = 'task:ui-controls-updated',\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 the task state machine reaches a final state and resources should be cleaned up.\n * Used internally by TaskManager to perform collection/call cleanup.\n * @internal\n */\n TASK_CLEANUP = 'task:cleanup',\n\n /**\n * Triggered when recording is started\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_STARTED, (task: ITask) => {\n * console.log('Recording started:', task.data.interactionId);\n * });\n * ```\n */\n TASK_RECORDING_STARTED = 'task:recordingStarted',\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 agent initiates exit from conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_EXIT_CONFERENCE, (task: ITask) => {\n * console.log('Exiting conference:', task.data.interactionId);\n * // Handle conference exit initiation\n * });\n * ```\n */\n TASK_EXIT_CONFERENCE = 'task:exitConference',\n\n /**\n * Triggered when agent initiates conference transfer\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_TRANSFER_CONFERENCE, (task: ITask) => {\n * console.log('Transferring conference:', task.data.interactionId);\n * // Handle conference transfer initiation\n * });\n * ```\n */\n TASK_TRANSFER_CONFERENCE = 'task:transferConference',\n\n /**\n * Triggered when agent switches between consult call and main call.\n * Use task.uiControls to determine current state and button visibility.\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_SWITCH_CALL, (task: ITask) => {\n * console.log('Call switched:', task.data.interactionId);\n * // Update UI based on task.uiControls.main.switch / task.uiControls.consult.switch\n * });\n * ```\n */\n TASK_SWITCH_CALL = 'task:switchCall',\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 interface CallAssociatedDatum {\n /** Whether the field can be edited by the agent */\n agentEditable: boolean;\n /** Whether the field is visible to the agent */\n agentViewable: boolean;\n /** Display name for the field */\n displayName: string;\n /** Whether the field is global */\n global: boolean;\n /** Whether the field is secure */\n isSecure: boolean;\n /** Internal field name */\n name: string;\n /** Whether the field is reportable */\n reportable: boolean;\n /** Secure key identifier */\n secureKeyId: string;\n /** Secure key version */\n secureKeyVersion: number;\n /** Data type of the field */\n type: string;\n /** Field value */\n value: string;\n}\n\nexport type CallAssociatedData = Record<string, CallAssociatedDatum>;\n\nexport type CallAssociatedDetails = Record<string, string>;\n\nexport interface FlowParameter {\n /** Parameter name */\n name?: string;\n /** Additional qualifier */\n qualifier?: string;\n /** Description of the parameter */\n description?: string;\n /** Data type of the value */\n valueDataType?: string;\n /** Value associated with the parameter */\n value?: string;\n}\n\nexport interface InteractionParticipant {\n /** Unique participant identifier */\n id: string;\n /** Participant type label used by backend */\n pType: string;\n /** Friendly participant type */\n type: string;\n /** Whether the participant has joined */\n hasJoined: boolean;\n /** Whether the participant has left */\n hasLeft: boolean;\n /** Whether the participant is still in pre-dial */\n isInPredial: boolean;\n /** Optional caller identifier */\n callerId?: string | null;\n /** Whether auto-answer is enabled */\n autoAnswerEnabled?: boolean;\n /** Backchannel/bnr details */\n bnrDetails?: unknown;\n /** Channel identifier for the participant */\n channelId?: string;\n /** Current consult state */\n consultState?: string | null;\n /** Timestamp when consult started */\n consultTimestamp?: number | null;\n /** Current participant state */\n currentState?: string | null;\n /** Timestamp of the current state */\n currentStateTimestamp?: number | null;\n /** Device call identifier */\n deviceCallId?: string | null;\n /** Device identifier */\n deviceId?: string | null;\n /** Device type (AGENT_DN, BROWSER, etc.) */\n deviceType?: string | null;\n /** Dial number associated with participant */\n dn?: string | null;\n /** Whether participant is currently consulted */\n isConsulted?: boolean;\n /** Whether participant offer is active */\n isOffered?: boolean;\n /** Whether participant is in wrap-up */\n isWrapUp?: boolean;\n /** Whether participant completed wrap-up */\n isWrappedUp?: boolean;\n /** Timestamp of when participant joined */\n joinTimestamp?: number | null;\n /** Last updated timestamp */\n lastUpdated?: number | null;\n /** Friendly name of participant */\n name?: string | null;\n /** Queue identifier associated with participant */\n queueId?: string;\n /** Queue manager identifier */\n queueMgrId?: string;\n /** Session identifier */\n sessionId?: string;\n /** Site identifier */\n siteId?: string;\n /** Skill identifier */\n skillId?: string | null;\n /** Skill name */\n skillName?: string | null;\n /** Skill list for participant */\n skills?: string[];\n /** Team identifier */\n teamId?: string;\n /** Team name */\n teamName?: string;\n /** Timestamp for wrap-up */\n wrapUpTimestamp?: number | null;\n /** Additional metadata */\n [key: string]: unknown;\n}\n\nexport type InteractionParticipants = Record<string, InteractionParticipant>;\n\n/**\n * Media entry type from interaction.media\n * Used for media state tracking in consult and conference scenarios\n */\nexport type MediaEntry = {\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 (e.g., 'mainCall', 'consult') */\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\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: InteractionParticipants;\n /** Detailed call associated data */\n callAssociatedData?: CallAssociatedData;\n /** Simplified call associated key/value pairs */\n callAssociatedDetails?: CallAssociatedDetails;\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 /** Identifier of parent interaction if applicable */\n parentInteractionId?: string;\n /** Indicates if media is forked for this interaction */\n isMediaForked?: boolean;\n /** Retroactive flow properties returned by backend */\n flowProperties?: Record<string, unknown> | null;\n /** Media specific properties returned by backend */\n mediaProperties?: Record<string, unknown> | null;\n /**\n * Detailed call processing information and metadata.\n * Mirrors the callProcessingDetails section described in Webex Contact Center Agent Contact payloads.\n */\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 /** Agent capability for pause/resume on this interaction */\n pauseResumeEnabled?: boolean;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Legacy pause indicator (recordInProgress=false is the active pause signal) */\n isPaused?: boolean;\n /** Recording is actively capturing audio right now */\n recordInProgress?: boolean;\n /** Recording was started for this interaction (may be paused) */\n recordingStarted?: boolean;\n /** Customer geographic region */\n customerRegion?: string;\n /** Flow tag identifier */\n flowTagId?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: boolean;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: boolean;\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 /** Indicates if the customer has left the call during an active consult */\n hasCustomerLeft?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Timestamp when interaction entered queue */\n queuedTimestamp?: number | null;\n /** Media-specific information for the interaction */\n media: Record<string, MediaEntry>;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: string;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Optional workflow manager identifier */\n workflowManager?: string | null;\n /** Parameters passed through the call flow */\n callFlowParams?: Record<string, FlowParameter>;\n};\n\n/**\n * Task payload mirroring the Agent Contact event payload from Webex Contact Center\n * (developer.webex.com). Arrives on AGENT_* websocket events and is the source of truth\n * for UI/state machine updates.\n * @public\n */\nexport type RealtimeTranscription = {\n agentId: string;\n orgId: string;\n notifType: string;\n notifDetails: {\n actionEvent: string;\n };\n data: {\n role: 'AGENT' | 'CALLER';\n utteranceId: string;\n conversationId: string;\n publishTimestamp: number;\n messageId: string;\n isFinal: boolean;\n languageCode: string;\n orgId: string;\n content: string;\n };\n};\n\nexport type TaskData = {\n /** Primary media resource identifier for the active leg (matches interaction.media[].mediaResourceId) */\n mediaResourceId: string;\n /** Agent event name from the websocket stream (e.g., AGENT_CONTACT_ASSIGNED) */\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 leg when present */\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 /** Interaction/contact identifier from backend (same as interaction.interactionId) */\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 /** Task/interaction type returned by the platform (routing/monitoring/etc.) */\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\n /**\n * Current consultation status derived from state machine\n * Values: CONSULT_INITIATED, CONSULT_ACCEPTED, BEING_CONSULTED,\n * BEING_CONSULTED_ACCEPTED, CONNECTED, CONFERENCE, CONSULT_COMPLETED\n */\n consultStatus?: string;\n\n /**\n * Indicates if consultation is in progress (state machine: CONSULTING)\n */\n isConsultInProgress?: boolean;\n\n /**\n * Indicates if the task is incoming for the active agent\n */\n isIncomingTask?: boolean;\n\n /**\n * Indicates if the task is on hold (state machine: HELD)\n */\n isOnHold?: boolean;\n\n /**\n * Indicates if customer is currently in the call\n * Derived from participants in main media\n */\n isCustomerInCall?: boolean;\n\n /**\n * Count of conference participants (agents only)\n * Used for determining if max participants reached\n */\n conferenceParticipantsCount?: number;\n\n /**\n * Indicates if this is a secondary agent (consulted party)\n */\n isSecondaryAgent?: boolean;\n\n /**\n * Indicates if this is a secondary EP-DN agent (telephony consult to external)\n */\n isSecondaryEpDnAgent?: boolean;\n\n /**\n * Task state for MPC (Multi-Party Conference) scenarios\n * Maps participant consultState to task state\n */\n mpcState?: string;\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\nexport type TaskUIControlState = {\n isVisible: boolean;\n isEnabled: boolean;\n};\n\n/**\n * UI control representation for a single interaction leg.\n */\nexport type InteractionUIControls = {\n accept: TaskUIControlState;\n decline: TaskUIControlState;\n hold: TaskUIControlState;\n transfer: TaskUIControlState;\n consult: TaskUIControlState;\n end: TaskUIControlState;\n recording: TaskUIControlState;\n mute: TaskUIControlState;\n consultTransfer: TaskUIControlState;\n endConsult: TaskUIControlState;\n conference: TaskUIControlState;\n exitConference: TaskUIControlState;\n transferConference: TaskUIControlState;\n mergeToConference: TaskUIControlState;\n wrapup: TaskUIControlState;\n switch: TaskUIControlState;\n};\n\nexport type TaskUILeg = 'main' | 'consult';\n\n/**\n * UI controls surfaced to task consumers.\n * Consumers should read controls from the per-leg surfaces and use `activeLeg`\n * to determine which one is currently interactive.\n */\nexport type TaskUIControls = {\n main: InteractionUIControls;\n consult: InteractionUIControls;\n activeLeg: TaskUILeg;\n};\n\n/**\n * Helper class for managing task action control state\n * Tracks visibility and enabled state for task actions that can be executed\n * @public\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 * Options for configuring transfer behavior\n * @public\n */\nexport type TransferOptions = {\n /** Additional transfer configuration options */\n [key: string]: unknown;\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 * Boolean-like fields in callProcessingDetails that may arrive as strings.\n * Used by taskDataNormalizer to coerce payloads to actual booleans.\n */\nexport type CallProcessingBooleanKey =\n | 'recordingStarted'\n | 'recordInProgress'\n | 'isPaused'\n | 'pauseResumeEnabled'\n | 'ctqInProgress'\n | 'outdialTransferToQueueEnabled'\n | 'taskToBeSelfServiced'\n | 'CONTINUE_RECORDING_ON_TRANSFER'\n | 'isParked'\n | 'participantInviteTimeout'\n | 'checkAgentAvailability';\n\n/**\n * Interaction-level boolean fields that may arrive as strings from backend payloads.\n */\nexport type InteractionBooleanKey = 'isFcManaged' | 'isMediaForked' | 'isTerminated';\n\n/**\n * Participant boolean fields that may arrive as strings and need normalization.\n */\nexport type ParticipantBooleanKey =\n | 'autoAnswerEnabled'\n | 'hasJoined'\n | 'hasLeft'\n | 'isConsulted'\n | 'isInPredial'\n | 'isOffered'\n | 'isWrapUp'\n | 'isWrappedUp';\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 * Payload shape used by consult conference helper utilities.\n */\nexport type consultConferencePayloadData = {\n agentId?: string;\n destinationType?: string;\n destAgentId?: string;\n};\n\n/**\n * Minimal event-emitter contract exposed to SDK consumers.\n * Defined here so that consumers do NOT need `@types/node` in their tsconfig.\n * The runtime Task class still extends Node's EventEmitter (via ampersand-events),\n * which satisfies this interface at runtime.\n * @public\n */\nexport interface IEventEmitter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n once(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n emit(event: string, ...args: any[]): boolean;\n}\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends IEventEmitter to support event-driven task updates\n */\nexport interface ITask extends IEventEmitter {\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 * Latest UI controls derived from the state machine.\n * Each control has `isVisible` and `isEnabled` flags computed from current task state.\n * Subscribe to {@link TASK_EVENTS.TASK_UI_CONTROLS_UPDATED} for change notifications.\n */\n readonly uiControls: TaskUIControls;\n\n /**\n * State machine instance for managing task state transitions and derived properties.\n * The state machine handles:\n * - State transitions (IDLE → OFFERED → CONNECTED → HELD, etc.)\n * - Derived properties (canHold, canResume, isConsulted, etc.)\n * - Action availability based on current state\n *\n * This is part of the migration from manual state management to centralized state machine.\n * During the transition period, both the old setUIControls() and state machine coexist.\n *\n * @see createTaskStateMachine\n * @internal\n */\n stateMachineService?: AnyActorRef;\n state?: any;\n\n /**\n * Helper method to send events to the state machine.\n * This is part of the migration to XState.\n * @internal\n */\n sendStateMachineEvent: (event: TaskEventPayload) => void;\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): void;\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, options?: TransferOptions): 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 between consult call and main call during consulting.\n * If on consult leg, switches to main call (holds consult).\n * If on main call, switches to consult (resumes consult).\n * Only available when in CONSULTING state.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.switchCall();\n * ```\n */\n switchCall(): 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\n/**\n * Interface for managing digital channel task operations in the contact center\n * Digital channels (chat, email, social, SMS) have a simpler interface than voice\n * Extends ITask but overrides updateTaskData to return IDigital\n * @public\n */\nexport interface IDigital extends Omit<ITask, 'updateTaskData'> {\n /**\n * Updates the task data\n * @param newData - Updated task data\n * @param shouldOverwrite - Whether to completely replace existing data\n * @returns Updated Digital task instance\n */\n updateTaskData(newData: TaskData, shouldOverwrite?: boolean): IDigital;\n}\n\n/**\n * Interface for managing voice/telephony task operations in the contact center\n * Extends ITask with voice-specific functionality for hold/resume operations\n * @public\n */\nexport interface IVoice extends ITask {\n /**\n * Toggles hold/resume state for a voice task.\n * If the task is currently on hold, it will be resumed.\n * If the task is active, it will be placed on hold.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await voiceTask.holdResume();\n * ```\n */\n holdResume(): Promise<TaskResponse>;\n}\n\n/**\n * Configuration options for voice task UI controls\n */\nexport type VoiceUIControlOptions = {\n isEndTaskEnabled?: boolean;\n isEndConsultEnabled?: boolean;\n voiceVariant?: VoiceVariant;\n isRecordingEnabled?: boolean;\n};\n\n/**\n * Participant information for UI display\n */\nexport type Participant = {\n id: string;\n name?: string;\n pType?: string;\n};\n\n/**\n * @deprecated Use Participant instead\n */\nexport type TaskAccessorParticipant = Participant;\n\nexport interface IWebRTC extends IVoice {\n /**\n * This method is used to mute/unmute the call.\n * @returns Promise<void>\n * @example\n * ```typescript\n * task.toggleMute();\n * ```\n */\n toggleMute(): Promise<void>;\n /**\n * Decline the incoming task for Browser Login\n *\n * @example\n * ```\n * task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n /**\n * This method is used to unregister the web call listeners.\n * @returns void\n * @example\n * ```typescript\n * task.unregisterWebCallListeners();\n * ```\n */\n unregisterWebCallListeners(): void;\n}\n\nexport type WebSocketPayload = TaskData & {\n type: string;\n mediaResourceId?: string;\n reason?: string;\n /**\n * Optional real-time transcript chunk payload.\n * Present on REAL_TIME_TRANSCRIPTION notifications.\n */\n data?: RealtimeTranscription['data'];\n};\n\nexport type WebSocketMessage = {\n keepalive?: 'true' | 'false' | boolean;\n type?: string;\n data: WebSocketPayload;\n};\n\n/**\n * Actions to be performed after handling an event\n *\n * These actions represent TaskManager-level concerns (task collection lifecycle,\n * resource cleanup) rather than task-level state machine concerns. The separation\n * ensures proper responsibility:\n * - TaskManager: Collection management, metrics, cleanup\n * - State Machine: Task state transitions, event emissions, UI controls\n */\nexport interface TaskEventActions {\n task?: ITask;\n}\n\n/**\n * Context for processing an event\n *\n * Contains all information needed to process a WebSocket event:\n * - Event type and payload from the backend\n * - Task instance (if exists)\n * - Pre-mapped state machine event (if applicable)\n */\nexport interface EventContext {\n eventType: string;\n payload: WebSocketPayload;\n task?: ITask;\n stateMachineEvent?: TaskEventPayload | null;\n}\n"],"mappings":";;;;;;AAAA;;AAMA;AACA;AACA;AACA;;AAGA;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;AACO,MAAMC,iBAAiB,GAAAd,OAAA,CAAAc,iBAAA,GAAG;EAC/BC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE;AACX,CAAU;AAIV;AACA;AACA;AACO,MAAMC,aAAa,GAAAjB,OAAA,CAAAiB,aAAA,GAAG;EAC3BC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACV,CAAU;AAIV;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAApB,OAAA,CAAAoB,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;EA9GYA,WAAW;EAiHrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA1HYA,WAAW;EA6HrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtIYA,WAAW;EAyIrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAlJYA,WAAW;EAqJrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA9JYA,WAAW;EAiKrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA1KYA,WAAW;EA6KrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtLYA,WAAW;EAyLrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAlMYA,WAAW;EAqMrB;AACF;AACA;AACA;AACA;EAzMYA,WAAW;EA4MrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApNYA,WAAW;EAuNrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhOYA,WAAW;EAmOrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5OYA,WAAW;EA+OrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxPYA,WAAW;EA2PrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApQYA,WAAW;EAuQrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhRYA,WAAW;EAmRrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5RYA,WAAW;EA+RrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxSYA,WAAW;EA2SrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApTYA,WAAW;EAuTrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApUYA,WAAW;EAuUrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhVYA,WAAW;EAmVrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5VYA,WAAW;EA+VrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxWYA,WAAW;EA2WrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApXYA,WAAW;EAuXrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhYYA,WAAW;EAmYrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5YYA,WAAW;EA+YrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxZYA,WAAW;EA2ZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApaYA,WAAW;EAuarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhbYA,WAAW;EAmbrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5bYA,WAAW;EA+brB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxcYA,WAAW;EA2crB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApdYA,WAAW;EAudrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjeYA,WAAW;EAoerB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7eYA,WAAW;EAgfrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzfYA,WAAW;EAAA,OAAXA,WAAW;AAAA;AA6fvB;AACA;AACA;AACA;AACA;AAwHA;AACA;AACA;AACA;AAyMA;AACA;AACA;AACA;AACA;AACA;AAyJA;AACA;AACA;AAsBA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;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;AAMA;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;AACA;AAGA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAoQA;AACA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AAeA;AACA;AACA;AAQA;AACA;AACA;AAOA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;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_CHANNEL_TYPE","VOICE","DIGITAL","VOICE_VARIANT","PSTN","WEBRTC","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type {AnyActorRef} from 'xstate';\nimport {TaskEventPayload} from './state-machine';\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 * Unique identifier for a call in the Webex calling system\n */\nexport type CallId = 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 * Supported task channel types for UI control configuration\n */\nexport const TASK_CHANNEL_TYPE = {\n VOICE: 'voice',\n DIGITAL: 'digital',\n} as const;\n\nexport type TaskChannelType = Enum<typeof TASK_CHANNEL_TYPE>;\n\n/**\n * Voice channel variants that toggle PSTN/WebRTC specific behaviors\n */\nexport const VOICE_VARIANT = {\n PSTN: 'pstn',\n WEBRTC: 'webrtc',\n} as const;\n\nexport type VoiceVariant = Enum<typeof VOICE_VARIANT>;\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 whenever task UI controls are recalculated\n */\n TASK_UI_CONTROLS_UPDATED = 'task:ui-controls-updated',\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 the task state machine reaches a final state and resources should be cleaned up.\n * Used internally by TaskManager to perform collection/call cleanup.\n * @internal\n */\n TASK_CLEANUP = 'task:cleanup',\n\n /**\n * Triggered when recording is started\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_STARTED, (task: ITask) => {\n * console.log('Recording started:', task.data.interactionId);\n * });\n * ```\n */\n TASK_RECORDING_STARTED = 'task:recordingStarted',\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 agent initiates exit from conference\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_EXIT_CONFERENCE, (task: ITask) => {\n * console.log('Exiting conference:', task.data.interactionId);\n * // Handle conference exit initiation\n * });\n * ```\n */\n TASK_EXIT_CONFERENCE = 'task:exitConference',\n\n /**\n * Triggered when agent initiates conference transfer\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_TRANSFER_CONFERENCE, (task: ITask) => {\n * console.log('Transferring conference:', task.data.interactionId);\n * // Handle conference transfer initiation\n * });\n * ```\n */\n TASK_TRANSFER_CONFERENCE = 'task:transferConference',\n\n /**\n * Triggered when agent switches between consult call and main call.\n * Use task.uiControls to determine current state and button visibility.\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_SWITCH_CALL, (task: ITask) => {\n * console.log('Call switched:', task.data.interactionId);\n * // Update UI based on task.uiControls.main.switch / task.uiControls.consult.switch\n * });\n * ```\n */\n TASK_SWITCH_CALL = 'task:switchCall',\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 multi-login task update should hydrate SDK instances without Mobius registration.\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MULTI_LOGIN_HYDRATE, (task: ITask) => {\n * console.log('Multi-login hydrate:', task.data.interactionId);\n * });\n * ```\n */\n TASK_MULTI_LOGIN_HYDRATE = 'task:multiLoginHydrate',\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 interface CallAssociatedDatum {\n /** Whether the field can be edited by the agent */\n agentEditable: boolean;\n /** Whether the field is visible to the agent */\n agentViewable: boolean;\n /** Display name for the field */\n displayName: string;\n /** Whether the field is global */\n global: boolean;\n /** Whether the field is secure */\n isSecure: boolean;\n /** Internal field name */\n name: string;\n /** Whether the field is reportable */\n reportable: boolean;\n /** Secure key identifier */\n secureKeyId: string;\n /** Secure key version */\n secureKeyVersion: number;\n /** Data type of the field */\n type: string;\n /** Field value */\n value: string;\n}\n\nexport type CallAssociatedData = Record<string, CallAssociatedDatum>;\n\nexport type CallAssociatedDetails = Record<string, string>;\n\nexport interface FlowParameter {\n /** Parameter name */\n name?: string;\n /** Additional qualifier */\n qualifier?: string;\n /** Description of the parameter */\n description?: string;\n /** Data type of the value */\n valueDataType?: string;\n /** Value associated with the parameter */\n value?: string;\n}\n\nexport interface InteractionParticipant {\n /** Unique participant identifier */\n id: string;\n /** Participant type label used by backend */\n pType: string;\n /** Friendly participant type */\n type: string;\n /** Whether the participant has joined */\n hasJoined: boolean;\n /** Whether the participant has left */\n hasLeft: boolean;\n /** Whether the participant is still in pre-dial */\n isInPredial: boolean;\n /** Optional caller identifier */\n callerId?: string | null;\n /** Whether auto-answer is enabled */\n autoAnswerEnabled?: boolean;\n /** Backchannel/bnr details */\n bnrDetails?: unknown;\n /** Channel identifier for the participant */\n channelId?: string;\n /** Current consult state */\n consultState?: string | null;\n /** Timestamp when consult started */\n consultTimestamp?: number | null;\n /** Current participant state */\n currentState?: string | null;\n /** Timestamp of the current state */\n currentStateTimestamp?: number | null;\n /** Device call identifier */\n deviceCallId?: string | null;\n /** Device identifier */\n deviceId?: string | null;\n /** Device type (AGENT_DN, BROWSER, etc.) */\n deviceType?: string | null;\n /** Dial number associated with participant */\n dn?: string | null;\n /** Whether participant is currently consulted */\n isConsulted?: boolean;\n /** Whether participant offer is active */\n isOffered?: boolean;\n /** Whether participant is in wrap-up */\n isWrapUp?: boolean;\n /** Whether participant completed wrap-up */\n isWrappedUp?: boolean;\n /** Timestamp of when participant joined */\n joinTimestamp?: number | null;\n /** Last updated timestamp */\n lastUpdated?: number | null;\n /** Friendly name of participant */\n name?: string | null;\n /** Queue identifier associated with participant */\n queueId?: string;\n /** Queue manager identifier */\n queueMgrId?: string;\n /** Session identifier */\n sessionId?: string;\n /** Site identifier */\n siteId?: string;\n /** Skill identifier */\n skillId?: string | null;\n /** Skill name */\n skillName?: string | null;\n /** Skill list for participant */\n skills?: string[];\n /** Team identifier */\n teamId?: string;\n /** Team name */\n teamName?: string;\n /** Timestamp for wrap-up */\n wrapUpTimestamp?: number | null;\n /** Additional metadata */\n [key: string]: unknown;\n}\n\nexport type InteractionParticipants = Record<string, InteractionParticipant>;\n\n/**\n * Media entry type from interaction.media\n * Used for media state tracking in consult and conference scenarios\n */\nexport type MediaEntry = {\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 (e.g., 'mainCall', 'consult') */\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\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: InteractionParticipants;\n /** Detailed call associated data */\n callAssociatedData?: CallAssociatedData;\n /** Simplified call associated key/value pairs */\n callAssociatedDetails?: CallAssociatedDetails;\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 /** Identifier of parent interaction if applicable */\n parentInteractionId?: string;\n /** Indicates if media is forked for this interaction */\n isMediaForked?: boolean;\n /** Retroactive flow properties returned by backend */\n flowProperties?: Record<string, unknown> | null;\n /** Media specific properties returned by backend */\n mediaProperties?: Record<string, unknown> | null;\n /**\n * Detailed call processing information and metadata.\n * Mirrors the callProcessingDetails section described in Webex Contact Center Agent Contact payloads.\n */\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 /** Agent capability for pause/resume on this interaction */\n pauseResumeEnabled?: boolean;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Legacy pause indicator (recordInProgress=false is the active pause signal) */\n isPaused?: boolean;\n /** Recording is actively capturing audio right now */\n recordInProgress?: boolean;\n /** Recording was started for this interaction (may be paused) */\n recordingStarted?: boolean;\n /** Customer geographic region */\n customerRegion?: string;\n /** Flow tag identifier */\n flowTagId?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: boolean;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: boolean;\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 /** Indicates if the customer has left the call during an active consult */\n hasCustomerLeft?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Timestamp when interaction entered queue */\n queuedTimestamp?: number | null;\n /** Media-specific information for the interaction */\n media: Record<string, MediaEntry>;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: string;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Optional workflow manager identifier */\n workflowManager?: string | null;\n /** Parameters passed through the call flow */\n callFlowParams?: Record<string, FlowParameter>;\n};\n\n/**\n * Task payload mirroring the Agent Contact event payload from Webex Contact Center\n * (developer.webex.com). Arrives on AGENT_* websocket events and is the source of truth\n * for UI/state machine updates.\n * @public\n */\nexport type RealtimeTranscription = {\n agentId: string;\n orgId: string;\n notifType: string;\n notifDetails: {\n actionEvent: string;\n };\n data: {\n role: 'AGENT' | 'CALLER';\n utteranceId: string;\n conversationId: string;\n publishTimestamp: number;\n messageId: string;\n isFinal: boolean;\n languageCode: string;\n orgId: string;\n content: string;\n };\n};\n\nexport type TaskData = {\n /** Primary media resource identifier for the active leg (matches interaction.media[].mediaResourceId) */\n mediaResourceId: string;\n /** Agent event name from the websocket stream (e.g., AGENT_CONTACT_ASSIGNED) */\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 leg when present */\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 /** Interaction/contact identifier from backend (same as interaction.interactionId) */\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 /** Task/interaction type returned by the platform (routing/monitoring/etc.) */\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\n /**\n * Current consultation status derived from state machine\n * Values: CONSULT_INITIATED, CONSULT_ACCEPTED, BEING_CONSULTED,\n * BEING_CONSULTED_ACCEPTED, CONNECTED, CONFERENCE, CONSULT_COMPLETED\n */\n consultStatus?: string;\n\n /**\n * Indicates if consultation is in progress (state machine: CONSULTING)\n */\n isConsultInProgress?: boolean;\n\n /**\n * Indicates if the task is incoming for the active agent\n */\n isIncomingTask?: boolean;\n\n /**\n * Indicates if the task is on hold (state machine: HELD)\n */\n isOnHold?: boolean;\n\n /**\n * Indicates if customer is currently in the call\n * Derived from participants in main media\n */\n isCustomerInCall?: boolean;\n\n /**\n * Count of conference participants (agents only)\n * Used for determining if max participants reached\n */\n conferenceParticipantsCount?: number;\n\n /**\n * Indicates if this is a secondary agent (consulted party)\n */\n isSecondaryAgent?: boolean;\n\n /**\n * Indicates if this is a secondary EP-DN agent (telephony consult to external)\n */\n isSecondaryEpDnAgent?: boolean;\n\n /**\n * Task state for MPC (Multi-Party Conference) scenarios\n * Maps participant consultState to task state\n */\n mpcState?: string;\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\nexport type TaskUIControlState = {\n isVisible: boolean;\n isEnabled: boolean;\n};\n\n/**\n * UI control representation for a single interaction leg.\n */\nexport type InteractionUIControls = {\n accept: TaskUIControlState;\n decline: TaskUIControlState;\n hold: TaskUIControlState;\n transfer: TaskUIControlState;\n consult: TaskUIControlState;\n end: TaskUIControlState;\n recording: TaskUIControlState;\n mute: TaskUIControlState;\n consultTransfer: TaskUIControlState;\n endConsult: TaskUIControlState;\n conference: TaskUIControlState;\n exitConference: TaskUIControlState;\n transferConference: TaskUIControlState;\n mergeToConference: TaskUIControlState;\n wrapup: TaskUIControlState;\n switch: TaskUIControlState;\n};\n\nexport type TaskUILeg = 'main' | 'consult';\n\n/**\n * UI controls surfaced to task consumers.\n * Consumers should read controls from the per-leg surfaces and use `activeLeg`\n * to determine which one is currently interactive.\n */\nexport type TaskUIControls = {\n main: InteractionUIControls;\n consult: InteractionUIControls;\n activeLeg: TaskUILeg;\n};\n\n/**\n * Helper class for managing task action control state\n * Tracks visibility and enabled state for task actions that can be executed\n * @public\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 * Options for configuring transfer behavior\n * @public\n */\nexport type TransferOptions = {\n /** Additional transfer configuration options */\n [key: string]: unknown;\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 * Boolean-like fields in callProcessingDetails that may arrive as strings.\n * Used by taskDataNormalizer to coerce payloads to actual booleans.\n */\nexport type CallProcessingBooleanKey =\n | 'recordingStarted'\n | 'recordInProgress'\n | 'isPaused'\n | 'pauseResumeEnabled'\n | 'ctqInProgress'\n | 'outdialTransferToQueueEnabled'\n | 'taskToBeSelfServiced'\n | 'CONTINUE_RECORDING_ON_TRANSFER'\n | 'isParked'\n | 'participantInviteTimeout'\n | 'checkAgentAvailability';\n\n/**\n * Interaction-level boolean fields that may arrive as strings from backend payloads.\n */\nexport type InteractionBooleanKey = 'isFcManaged' | 'isMediaForked' | 'isTerminated';\n\n/**\n * Participant boolean fields that may arrive as strings and need normalization.\n */\nexport type ParticipantBooleanKey =\n | 'autoAnswerEnabled'\n | 'hasJoined'\n | 'hasLeft'\n | 'isConsulted'\n | 'isInPredial'\n | 'isOffered'\n | 'isWrapUp'\n | 'isWrappedUp';\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 * Payload shape used by consult conference helper utilities.\n */\nexport type consultConferencePayloadData = {\n agentId?: string;\n destinationType?: string;\n destAgentId?: string;\n};\n\n/**\n * Minimal event-emitter contract exposed to SDK consumers.\n * Defined here so that consumers do NOT need `@types/node` in their tsconfig.\n * The runtime Task class still extends Node's EventEmitter (via ampersand-events),\n * which satisfies this interface at runtime.\n * @public\n */\nexport interface IEventEmitter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n once(event: string, listener: (...args: any[]) => void): this;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n emit(event: string, ...args: any[]): boolean;\n}\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends IEventEmitter to support event-driven task updates\n */\nexport interface ITask extends IEventEmitter {\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 * Latest UI controls derived from the state machine.\n * Each control has `isVisible` and `isEnabled` flags computed from current task state.\n * Subscribe to {@link TASK_EVENTS.TASK_UI_CONTROLS_UPDATED} for change notifications.\n */\n readonly uiControls: TaskUIControls;\n\n /**\n * State machine instance for managing task state transitions and derived properties.\n * The state machine handles:\n * - State transitions (IDLE → OFFERED → CONNECTED → HELD, etc.)\n * - Derived properties (canHold, canResume, isConsulted, etc.)\n * - Action availability based on current state\n *\n * This is part of the migration from manual state management to centralized state machine.\n * During the transition period, both the old setUIControls() and state machine coexist.\n *\n * @see createTaskStateMachine\n * @internal\n */\n stateMachineService?: AnyActorRef;\n state?: any;\n\n /**\n * Helper method to send events to the state machine.\n * This is part of the migration to XState.\n * @internal\n */\n sendStateMachineEvent: (event: TaskEventPayload) => void;\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): void;\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, options?: TransferOptions): 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 between consult call and main call during consulting.\n * If on consult leg, switches to main call (holds consult).\n * If on main call, switches to consult (resumes consult).\n * Only available when in CONSULTING state.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await task.switchCall();\n * ```\n */\n switchCall(): 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\n/**\n * Interface for managing digital channel task operations in the contact center\n * Digital channels (chat, email, social, SMS) have a simpler interface than voice\n * Extends ITask but overrides updateTaskData to return IDigital\n * @public\n */\nexport interface IDigital extends Omit<ITask, 'updateTaskData'> {\n /**\n * Updates the task data\n * @param newData - Updated task data\n * @param shouldOverwrite - Whether to completely replace existing data\n * @returns Updated Digital task instance\n */\n updateTaskData(newData: TaskData, shouldOverwrite?: boolean): IDigital;\n}\n\n/**\n * Interface for managing voice/telephony task operations in the contact center\n * Extends ITask with voice-specific functionality for hold/resume operations\n * @public\n */\nexport interface IVoice extends ITask {\n /**\n * Toggles hold/resume state for a voice task.\n * If the task is currently on hold, it will be resumed.\n * If the task is active, it will be placed on hold.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * await voiceTask.holdResume();\n * ```\n */\n holdResume(): Promise<TaskResponse>;\n}\n\n/**\n * Configuration options for voice task UI controls\n */\nexport type VoiceUIControlOptions = {\n isEndTaskEnabled?: boolean;\n isEndConsultEnabled?: boolean;\n voiceVariant?: VoiceVariant;\n isRecordingEnabled?: boolean;\n};\n\n/**\n * Participant information for UI display\n */\nexport type Participant = {\n id: string;\n name?: string;\n pType?: string;\n};\n\n/**\n * @deprecated Use Participant instead\n */\nexport type TaskAccessorParticipant = Participant;\n\nexport interface IWebRTC extends IVoice {\n /**\n * This method is used to mute/unmute the call.\n * @returns Promise<void>\n * @example\n * ```typescript\n * task.toggleMute();\n * ```\n */\n toggleMute(): Promise<void>;\n /**\n * Decline the incoming task for Browser Login\n *\n * @example\n * ```\n * task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n /**\n * This method is used to unregister the web call listeners.\n * @returns void\n * @example\n * ```typescript\n * task.unregisterWebCallListeners();\n * ```\n */\n unregisterWebCallListeners(): void;\n}\n\nexport type WebSocketPayload = TaskData & {\n type: string;\n mediaResourceId?: string;\n reason?: string;\n /**\n * Optional real-time transcript chunk payload.\n * Present on REAL_TIME_TRANSCRIPTION notifications.\n */\n data?: RealtimeTranscription['data'];\n};\n\nexport type WebSocketMessage = {\n keepalive?: 'true' | 'false' | boolean;\n type?: string;\n data: WebSocketPayload;\n};\n\n/**\n * Actions to be performed after handling an event\n *\n * These actions represent TaskManager-level concerns (task collection lifecycle,\n * resource cleanup) rather than task-level state machine concerns. The separation\n * ensures proper responsibility:\n * - TaskManager: Collection management, metrics, cleanup\n * - State Machine: Task state transitions, event emissions, UI controls\n */\nexport interface TaskEventActions {\n task?: ITask;\n}\n\n/**\n * Context for processing an event\n *\n * Contains all information needed to process a WebSocket event:\n * - Event type and payload from the backend\n * - Task instance (if exists)\n * - Pre-mapped state machine event (if applicable)\n */\nexport interface EventContext {\n eventType: string;\n payload: WebSocketPayload;\n task?: ITask;\n stateMachineEvent?: TaskEventPayload | null;\n}\n"],"mappings":";;;;;;AAAA;;AAMA;AACA;AACA;AACA;;AAGA;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;AACO,MAAMC,iBAAiB,GAAAd,OAAA,CAAAc,iBAAA,GAAG;EAC/BC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE;AACX,CAAU;AAIV;AACA;AACA;AACO,MAAMC,aAAa,GAAAjB,OAAA,CAAAiB,aAAA,GAAG;EAC3BC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACV,CAAU;AAIV;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAApB,OAAA,CAAAoB,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;EA9GYA,WAAW;EAiHrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA1HYA,WAAW;EA6HrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtIYA,WAAW;EAyIrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAlJYA,WAAW;EAqJrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA9JYA,WAAW;EAiKrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA1KYA,WAAW;EA6KrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAtLYA,WAAW;EAyLrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAlMYA,WAAW;EAqMrB;AACF;AACA;AACA;AACA;EAzMYA,WAAW;EA4MrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApNYA,WAAW;EAuNrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhOYA,WAAW;EAmOrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5OYA,WAAW;EA+OrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxPYA,WAAW;EA2PrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApQYA,WAAW;EAuQrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhRYA,WAAW;EAmRrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5RYA,WAAW;EA+RrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxSYA,WAAW;EA2SrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApTYA,WAAW;EAuTrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApUYA,WAAW;EAuUrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhVYA,WAAW;EAmVrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5VYA,WAAW;EA+VrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxWYA,WAAW;EA2WrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApXYA,WAAW;EAuXrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhYYA,WAAW;EAmYrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5YYA,WAAW;EA+YrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxZYA,WAAW;EA2ZrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApaYA,WAAW;EAuarB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAhbYA,WAAW;EAmbrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA5bYA,WAAW;EA+brB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAxcYA,WAAW;EA2crB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApdYA,WAAW;EAudrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAjeYA,WAAW;EAoerB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EA7eYA,WAAW;EAgfrB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAzfYA,WAAW;EA4frB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EApgBYA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAwgBvB;AACA;AACA;AACA;AACA;AAwHA;AACA;AACA;AACA;AAyMA;AACA;AACA;AACA;AACA;AACA;AAyJA;AACA;AACA;AAsBA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;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;AAMA;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;AACA;AAGA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAoQA;AACA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AAeA;AACA;AACA;AAQA;AACA;AACA;AAOA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -282,6 +282,12 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
282
282
  * @param {ITask} task The task object to be hydrated with additional data
283
283
  */
284
284
  private handleTaskHydrate;
285
+ /**
286
+ * Handles multi-login hydrate events for SDK instances without Mobius registration
287
+ * @private
288
+ * @param {ITask} task The task object associated with the multi-login hydrate
289
+ */
290
+ private handleTaskMultiLoginHydrate;
285
291
  /**
286
292
  * Handles task merged events when tasks are combined eg: EPDN merge/transfer
287
293
  * @private
@@ -519,6 +525,17 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
519
525
  */
520
526
  private handleWebsocketMessage;
521
527
  private handleRTDWebsocketMessage;
528
+ /**
529
+ * Checks whether Mobius/WebRTC registration should be skipped by config
530
+ * @returns {boolean} True when browser WebRTC registration is disabled
531
+ * @private
532
+ */
533
+ private isWebRTCRegistrationDisabled;
534
+ /**
535
+ * Validates contact-center plugin configuration before service initialization
536
+ * @private
537
+ */
538
+ private validatePluginConfig;
522
539
  /**
523
540
  * Initializes event listeners for the Contact Center service
524
541
  * Sets up handlers for connection state changes and other core events
@@ -25,6 +25,12 @@ declare const _default: {
25
25
  * @default true
26
26
  */
27
27
  allowAutomatedRelogin: boolean;
28
+ /**
29
+ * Whether to skip Mobius/WebRTC registration for browser login flows.
30
+ * @type {boolean}
31
+ * @default false
32
+ */
33
+ disableWebRTCRegistration: boolean;
28
34
  /**
29
35
  * The type of client making the connection.
30
36
  * @type {string}
@@ -558,7 +558,17 @@ export declare enum TASK_EVENTS {
558
558
  * });
559
559
  * ```
560
560
  */
561
- TASK_POST_CALL_ACTIVITY = "task:postCallActivity"
561
+ TASK_POST_CALL_ACTIVITY = "task:postCallActivity",
562
+ /**
563
+ * Triggered when a multi-login task update should hydrate SDK instances without Mobius registration.
564
+ * @example
565
+ * ```typescript
566
+ * task.on(TASK_EVENTS.TASK_MULTI_LOGIN_HYDRATE, (task: ITask) => {
567
+ * console.log('Multi-login hydrate:', task.data.interactionId);
568
+ * });
569
+ * ```
570
+ */
571
+ TASK_MULTI_LOGIN_HYDRATE = "task:multiLoginHydrate"
562
572
  }
563
573
  /**
564
574
  * Represents a customer interaction within the contact center system
@@ -106,6 +106,8 @@ export interface CCPluginConfig {
106
106
  };
107
107
  /** Configuration for the calling client */
108
108
  callingClientConfig: CallingClientConfig;
109
+ /** Whether to skip Mobius/WebRTC registration for browser login flows */
110
+ disableWebRTCRegistration?: boolean;
109
111
  }
110
112
  /**
111
113
  * Logger interface for standardized logging throughout the plugin.
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {AIFeatureFlags, Profile} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transfered to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n * @ignore\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents.\n * Determines which channel capability the returned agents must have.\n */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n description?: string;\n type: string;\n isActive: boolean;\n orgId: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request an AI Assistant suggested response.\n * @public\n * @example\n * const params: SuggestedResponseParams = {\n * interactionId: 'interaction-123',\n * actionTimeStamp: Date.now(),\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type SuggestedResponseParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which suggestion should be generated */\n interactionId: string;\n /** Optional additional context that should refine the suggestion */\n context?: string;\n /** Optional language code for suggestions (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAqFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAgBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAX,OAAA,CAAAW,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAd,OAAA,CAAAc,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE;AAC/B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["HTTP_METHODS","exports","GET","POST","PATCH","PUT","DELETE","LOGGING_LEVEL","LoginOption","AGENT_DN","EXTENSION","BROWSER","AIAssistantEventType","CUSTOM_EVENT","CTI_EVENT","AIAssistantEventName","GET_TRANSCRIPTS","GET_SUGGESTIONS","ADD_SUGGESTIONS_EXTRA_CONTEXT","GET_MID_CALL_SUMMARY","GET_POST_CALL_SUMMARY","MID_CALL_SUMMARY_RESPONSE","POST_CALL_SUMMARY_RESPONSE","SUGGESTED_RESPONSES_DIGITAL"],"sources":["types.ts"],"sourcesContent":["import {CallingClientConfig} from '@webex/calling';\nimport {\n SubmitBehavioralEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n} from '@webex/internal-plugin-metrics/src/metrics.types';\nimport * as Agent from './services/agent/types';\nimport * as Contact from './services/task/types';\nimport {AIFeatureFlags, Profile} from './services/config/types';\nimport {PaginatedResponse, BaseSearchParams} from './utils/PageCache';\n\n/**\n * Generic type for converting a const enum object into a union type of its values.\n * @template T The enum object type\n * @internal\n * @ignore\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * HTTP methods supported by WebexRequest.\n * @enum {string}\n * @public\n * @example\n * const method: HTTP_METHODS = HTTP_METHODS.GET;\n * @ignore\n */\nexport const HTTP_METHODS = {\n /** HTTP GET method for retrieving data */\n GET: 'GET',\n /** HTTP POST method for creating resources */\n POST: 'POST',\n /** HTTP PATCH method for partial updates */\n PATCH: 'PATCH',\n /** HTTP PUT method for complete updates */\n PUT: 'PUT',\n /** HTTP DELETE method for removing resources */\n DELETE: 'DELETE',\n} as const;\n\n/**\n * Union type of HTTP methods.\n * @public\n * @example\n * function makeRequest(method: HTTP_METHODS) { ... }\n * @ignore\n */\nexport type HTTP_METHODS = Enum<typeof HTTP_METHODS>;\n\n/**\n * Payload for making requests to Webex APIs.\n * @public\n * @example\n * const payload: WebexRequestPayload = {\n * service: 'identity',\n * resource: '/users',\n * method: HTTP_METHODS.GET\n * };\n * @ignore\n */\nexport type WebexRequestPayload = {\n /** Service name to target */\n service?: string;\n /** Resource path within the service */\n resource?: string;\n /** HTTP method to use */\n method?: HTTP_METHODS;\n /** Full URI if not using service/resource pattern */\n uri?: string;\n /** Whether to add authorization header */\n addAuthHeader?: boolean;\n /** Custom headers to include in request */\n headers?: {\n [key: string]: string | null;\n };\n /** Request body data */\n body?: object;\n /** Expected response status code */\n statusCode?: number;\n /** Whether to parse response as JSON */\n json?: boolean;\n};\n\n/**\n * Event listener function type.\n * @internal\n * @ignore\n */\ntype Listener = (e: string, data?: unknown) => void;\n\n/**\n * Event listener removal function type.\n * @internal\n * @ignore\n */\ntype ListenerOff = (e: string) => void;\n\n/**\n * Service host configuration.\n * @internal\n * @ignore\n */\ntype ServiceHost = {\n /** Host URL/domain for the service */\n host: string;\n /** Time-to-live in seconds */\n ttl: number;\n /** Priority level for load balancing (lower is higher priority) */\n priority: number;\n /** Unique identifier for this host */\n id: string;\n /** Whether this is the home cluster for the user */\n homeCluster?: boolean;\n};\n\n/**\n * Configuration options for the Contact Center Plugin.\n * @interface CCPluginConfig\n * @public\n * @example\n * const config: CCPluginConfig = {\n * allowMultiLogin: true,\n * allowAutomatedRelogin: false,\n * clientType: 'browser',\n * isKeepAliveEnabled: true,\n * force: false,\n * metrics: { clientName: 'myClient', clientType: 'browser' },\n * logging: { enable: true, verboseEvents: false },\n * callingClientConfig: { ... }\n * };\n */\nexport interface CCPluginConfig {\n /** Whether to allow multiple logins from different devices */\n allowMultiLogin: boolean;\n /** Whether to automatically attempt relogin on connection loss */\n allowAutomatedRelogin: boolean;\n /** The type of client making the connection */\n clientType: string;\n /** Whether to enable keep-alive messages */\n isKeepAliveEnabled: boolean;\n /** Whether to force registration */\n force: boolean;\n /** Metrics configuration */\n metrics: {\n /** Name of the client for metrics */\n clientName: string;\n /** Type of client for metrics */\n clientType: string;\n };\n /** Logging configuration */\n logging: {\n /** Whether to enable logging */\n enable: boolean;\n /** Whether to log verbose events */\n verboseEvents: boolean;\n };\n /** Configuration for the calling client */\n callingClientConfig: CallingClientConfig;\n /** Whether to skip Mobius/WebRTC registration for browser login flows */\n disableWebRTCRegistration?: boolean;\n}\n\n/**\n * Logger interface for standardized logging throughout the plugin.\n * @public\n * @example\n * logger.log('This is a log message');\n * logger.error('This is an error message');\n * @ignore\n */\nexport type Logger = {\n /** Log general messages */\n log: (payload: string) => void;\n /** Log error messages */\n error: (payload: string) => void;\n /** Log warning messages */\n warn: (payload: string) => void;\n /** Log informational messages */\n info: (payload: string) => void;\n /** Log detailed trace messages */\n trace: (payload: string) => void;\n /** Log debug messages */\n debug: (payload: string) => void;\n};\n\n/**\n * Contextual information for log entries.\n * @public\n * @ignore\n */\nexport interface LogContext {\n /** Module name where the log originated */\n module?: string;\n /** Method name where the log originated */\n method?: string;\n interactionId?: string;\n trackingId?: string;\n /** Additional structured data to include in logs */\n data?: Record<string, any>;\n /** Error object to include in logs */\n error?: Error | unknown;\n}\n\n/**\n * Available logging severity levels.\n * @enum {string}\n * @public\n * @example\n * const level: LOGGING_LEVEL = LOGGING_LEVEL.error;\n * @ignore\n */\nexport enum LOGGING_LEVEL {\n /** Critical failures that require immediate attention */\n error = 'ERROR',\n /** Important issues that don't prevent the system from working */\n warn = 'WARN',\n /** General informational logs */\n log = 'LOG',\n /** Detailed information about system operation */\n info = 'INFO',\n /** Highly detailed diagnostic information */\n trace = 'TRACE',\n}\n\n/**\n * Metadata for log uploads.\n * @public\n * @example\n * const meta: LogsMetaData = { feedbackId: 'fb123', correlationId: 'corr456' };\n * @ignore\n */\nexport type LogsMetaData = {\n /** Optional feedback ID to associate with logs */\n feedbackId?: string;\n /** Optional correlation ID to track related operations */\n correlationId?: string;\n};\n\n/**\n * Response from uploading logs to the server.\n * @public\n * @example\n * const response: UploadLogsResponse = { trackingid: 'track123', url: 'https://...', userId: 'user1' };\n */\nexport type UploadLogsResponse = {\n /** Tracking ID for the upload request */\n trackingid?: string;\n /** URL where the logs can be accessed */\n url?: string;\n /** ID of the user who uploaded logs */\n userId?: string;\n /** Feedback ID associated with the logs */\n feedbackId?: string;\n /** Correlation ID for tracking related operations */\n correlationId?: string;\n};\n\n/**\n * Internal Webex SDK interfaces needed for plugin integration.\n * @internal\n * @ignore\n */\ninterface IWebexInternal {\n /** Mercury service for real-time messaging */\n mercury: {\n /** Register an event listener */\n on: Listener;\n /** Remove an event listener */\n off: ListenerOff;\n /** Establish a connection to the Mercury service */\n connect: () => Promise<void>;\n /** Disconnect from the Mercury service */\n disconnect: () => Promise<void>;\n /** Whether Mercury is currently connected */\n connected: boolean;\n /** Whether Mercury is in the process of connecting */\n connecting: boolean;\n };\n /** Device information */\n device: {\n /** Current WDM URL */\n url: string;\n /** Current user's ID */\n userId: string;\n /** Current organization ID */\n orgId: string;\n /** Device version */\n version: string;\n /** Calling behavior configuration */\n callingBehavior: string;\n };\n /** Presence service */\n presence: unknown;\n /** Services discovery and management */\n services: {\n /** Get a service URL by name */\n get: (service: string) => string;\n /** Wait for service catalog to be loaded */\n waitForCatalog: (service: string) => Promise<void>;\n /** Host catalog for service discovery */\n _hostCatalog: Record<string, ServiceHost[]>;\n /** Service URLs cache */\n _serviceUrls: {\n /** Mobius calling service */\n mobius: string;\n /** Identity service */\n identity: string;\n /** Janus media server */\n janus: string;\n /** WDM (WebEx Device Management) service */\n wdm: string;\n /** BroadWorks IDP proxy service */\n broadworksIdpProxy: string;\n /** Hydra API service */\n hydra: string;\n /** Mercury API service */\n mercuryApi: string;\n /** UC Management gateway service */\n 'ucmgmt-gateway': string;\n /** Contacts service */\n contactsService: string;\n };\n };\n /** Metrics collection services */\n newMetrics: {\n /** Submit behavioral events (user actions) */\n submitBehavioralEvent: SubmitBehavioralEvent;\n /** Submit operational events (system operations) */\n submitOperationalEvent: SubmitOperationalEvent;\n /** Submit business events (business outcomes) */\n submitBusinessEvent: SubmitBusinessEvent;\n };\n /** Support functionality */\n support: {\n /** Submit logs to server */\n submitLogs: (\n metaData: LogsMetaData,\n logs: string,\n options: {\n /** Whether to submit full logs or just differences */\n type: 'diff' | 'full';\n }\n ) => Promise<UploadLogsResponse>;\n };\n}\n\n/**\n * Interface representing the WebexSDK core functionality.\n * @interface WebexSDK\n * @public\n * @example\n * const sdk: WebexSDK = ...;\n * sdk.request({ service: 'identity', resource: '/users', method: HTTP_METHODS.GET });\n * @ignore\n */\nexport interface WebexSDK {\n /** Version of the WebexSDK */\n version: string;\n /** Whether the SDK can authorize requests */\n canAuthorize: boolean;\n /** Credentials management */\n credentials: {\n /** Get the user token for authentication */\n getUserToken: () => Promise<string>;\n /** Get the organization ID */\n getOrgId: () => string;\n };\n /** Whether the SDK is ready for use */\n ready: boolean;\n /** Make a request to the Webex APIs */\n request: <T>(payload: WebexRequestPayload) => Promise<T>;\n /** Register a one-time event handler */\n once: (event: string, callBack: () => void) => void;\n /** Internal plugins and services */\n internal: IWebexInternal;\n /** Logger instance */\n logger: Logger;\n}\n\n/**\n * An interface for the `ContactCenter` class.\n * The `ContactCenter` package is designed to provide a set of APIs to perform various operations for the Agent flow within Webex Contact Center.\n * @public\n * @example\n * const cc: IContactCenter = ...;\n * cc.register().then(profile => { ... });\n * @ignore\n */\nexport interface IContactCenter {\n /**\n * Initialize the CC SDK by setting up the contact center mercury connection.\n * This establishes WebSocket connectivity for real-time communication.\n *\n * @returns A Promise that resolves to the agent's profile upon successful registration\n * @public\n * @example\n * cc.register().then(profile => { ... });\n */\n register(): Promise<Profile>;\n}\n\n/**\n * Generic HTTP response structure.\n * @public\n * @example\n * const response: IHttpResponse = { body: {}, statusCode: 200, method: 'GET', headers: {}, url: '...' };\n * @ignore\n */\nexport interface IHttpResponse {\n /** Response body content */\n body: any;\n /** HTTP status code */\n statusCode: number;\n /** HTTP method used for the request */\n method: string;\n /** Response headers */\n headers: Headers;\n /** Request URL */\n url: string;\n}\n\n/**\n * Supported login options for agent authentication.\n * @public\n * @example\n * const option: LoginOption = LoginOption.AGENT_DN;\n * @ignore\n */\nexport const LoginOption = {\n /** Login using agent's direct number */\n AGENT_DN: 'AGENT_DN',\n /** Login using an extension number */\n EXTENSION: 'EXTENSION',\n /** Login using browser WebRTC capabilities */\n BROWSER: 'BROWSER',\n} as const;\n\n/**\n * Union type of login options.\n * @public\n * @example\n * function login(option: LoginOption) { ... }\n * @ignore\n */\nexport type LoginOption = Enum<typeof LoginOption>;\n\n/**\n * Request payload for subscribing to the contact center websocket.\n * @public\n * @example\n * const req: SubscribeRequest = { force: true, isKeepAliveEnabled: true, clientType: 'browser', allowMultiLogin: false };\n * @ignore\n */\nexport type SubscribeRequest = {\n /** Whether to force connection even if another exists */\n force: boolean;\n /** Whether to send keepalive messages */\n isKeepAliveEnabled: boolean;\n /** Type of client connecting */\n clientType: string;\n /** Whether to allow login from multiple devices */\n allowMultiLogin: boolean;\n};\n\n/**\n * Represents the response from getListOfTeams method.\n * Teams are groups of agents that can be managed together.\n * @public\n * @example\n * const team: Team = { id: 'team1', name: 'Support', desktopLayoutId: 'layout1' };\n * @ignore\n */\nexport type Team = {\n /**\n * Unique identifier of the team.\n */\n id: string;\n\n /**\n * Display name of the team.\n */\n name: string;\n\n /**\n * Associated desktop layout ID for the team.\n * Controls how the agent desktop is displayed for team members.\n */\n desktopLayoutId?: string;\n};\n\n/**\n * Represents the request to perform agent login.\n * @public\n * @example\n * const login: AgentLogin = { dialNumber: '1234', teamId: 'team1', loginOption: LoginOption.AGENT_DN };\n */\nexport type AgentLogin = {\n /**\n * A dialNumber field contains the number to dial such as a route point or extension.\n * Required for AGENT_DN and EXTENSION login options.\n */\n dialNumber?: string;\n\n /**\n * The unique ID representing a team of users.\n * The agent must belong to this team.\n */\n teamId: string;\n\n /**\n * The loginOption field specifies the type of login method.\n * Controls how calls are delivered to the agent.\n */\n loginOption: LoginOption;\n};\n\n/**\n * Represents the request to update agent profile settings.\n * @public\n * @example\n * const update: AgentProfileUpdate = { loginOption: LoginOption.BROWSER, dialNumber: '5678' };\n */\nexport type AgentProfileUpdate = Pick<AgentLogin, 'loginOption' | 'dialNumber' | 'teamId'>;\n\n/**\n * Union type for all possible request body types.\n * @internal\n * @ignore\n */\nexport type RequestBody =\n | SubscribeRequest\n | Agent.Logout\n | Agent.UserStationLogin\n | Agent.StateChange\n | Agent.BuddyAgents\n | Contact.HoldResumePayload\n | Contact.ResumeRecordingPayload\n | Contact.ConsultPayload\n | Contact.ConsultEndAPIPayload // API Payload accepts only QueueId wheres SDK API allows more params\n | Contact.TransferPayLoad\n | Contact.ConsultTransferPayLoad\n | Contact.cancelCtq\n | Contact.WrapupPayLoad\n | Contact.DialerPayload;\n\n/**\n * Represents the options to fetch buddy agents for the logged in agent.\n * Buddy agents are other agents who can be consulted or transfered to.\n * @public\n * @example\n * const opts: BuddyAgents = { mediaType: 'telephony', state: 'Available' };\n * @ignore\n */\nexport type BuddyAgents = {\n /**\n * The media type channel to filter buddy agents.\n * Determines which channel capability the returned agents must have.\n */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n\n /**\n * Optional filter for agent state.\n * If specified, returns only agents in that state.\n * If omitted, returns both available and idle agents.\n */\n state?: 'Available' | 'Idle';\n};\n\n/**\n * Holds the configuration flags for the Agent.\n * These flags determine the availability of certain features in the Agent UI.\n * @internal\n */\nexport type ConfigFlags = {\n isEndTaskEnabled: boolean;\n isEndConsultEnabled: boolean;\n webRtcEnabled: boolean;\n autoWrapup: boolean;\n aiFeature?: AIFeatureFlags;\n /**\n * Optional toggle to globally enable/disable recording controls.\n * Falls back to backend hints when omitted.\n */\n isRecordingEnabled?: boolean;\n};\n\n/**\n\n * Generic error structure for Contact Center SDK errors.\n * Contains detailed information about the error context.\n * @public\n * @example\n * const err: GenericError = new Error('Failed');\n * err.details = { type: 'ERR', orgId: 'org1', trackingId: 'track1', data: {} };\n * @ignore\n */\nexport interface GenericError extends Error {\n /** Structured details about the error */\n details: {\n /** Error type identifier */\n type: string;\n /** Organization ID where the error occurred */\n orgId: string;\n /** Unique tracking ID for the error */\n trackingId: string;\n /** Additional error context data */\n data: Record<string, any>;\n };\n}\n\n/**\n * Response type for station login operations.\n * Either a success response with agent details or an error.\n * @public\n * @example\n * function handleLogin(resp: StationLoginResponse) { ... }\n */\nexport type StationLoginResponse = Agent.StationLoginSuccessResponse | Error;\n\n/**\n * Response type for station logout operations.\n * Either a success response with logout details or an error.\n * @public\n * @example\n * function handleLogout(resp: StationLogoutResponse) { ... }\n */\nexport type StationLogoutResponse = Agent.LogoutSuccess | Error;\n\n/**\n * Response type for station relogin operations.\n * Either a success response with relogin details or an error.\n * @public\n * @example\n * function handleReLogin(resp: StationReLoginResponse) { ... }\n * @ignore\n */\nexport type StationReLoginResponse = Agent.ReloginSuccess | Error;\n\n/**\n * Response type for agent state change operations.\n * Either a success response with state change details or an error.\n * @public\n * @example\n * function handleStateChange(resp: SetStateResponse) { ... }\n * @ignore\n */\nexport type SetStateResponse = Agent.StateChangeSuccess | Error;\n\n/**\n * AddressBook types\n */\nexport interface AddressBookEntry {\n id: string;\n organizationId?: string;\n version?: number;\n name: string;\n number: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport type AddressBookEntriesResponse = PaginatedResponse<AddressBookEntry>;\n\nexport interface AddressBookEntrySearchParams extends BaseSearchParams {\n addressBookId?: string;\n}\n\n/**\n * EntryPointRecord types\n */\nexport interface EntryPointRecord {\n id: string;\n name: string;\n description?: string;\n type: string;\n isActive: boolean;\n orgId: string;\n createdAt?: string;\n updatedAt?: string;\n settings?: Record<string, any>;\n}\n\nexport type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;\nexport type EntryPointSearchParams = BaseSearchParams;\n\n/**\n * Queue types\n */\nexport interface QueueSkillRequirement {\n organizationId?: string;\n id?: string;\n version?: number;\n skillId: string;\n skillName?: string;\n skillType?: string;\n condition: string;\n skillValue: string;\n createdTime?: number;\n lastUpdatedTime?: number;\n}\n\nexport interface QueueAgent {\n id: string;\n ciUserId?: string;\n}\n\nexport interface AgentGroup {\n teamId: string;\n}\n\nexport interface CallDistributionGroup {\n agentGroups: AgentGroup[];\n order: number;\n duration?: number;\n}\n\nexport interface AssistantSkillMapping {\n assistantSkillId?: string;\n assistantSkillUpdatedTime?: number;\n}\n\n/**\n * Configuration for a contact service queue\n * @public\n */\nexport interface ContactServiceQueue {\n /** Organization ID */\n organizationId?: string;\n /** Unique identifier for the queue */\n id?: string;\n /** Version of the queue */\n version?: number;\n /** Name of the Contact Service Queue */\n name: string;\n /** Description of the queue */\n description?: string;\n /** Queue type (INBOUND, OUTBOUND) */\n queueType: 'INBOUND' | 'OUTBOUND';\n /** Whether to check agent availability */\n checkAgentAvailability: boolean;\n /** Channel type (TELEPHONY, EMAIL, SOCIAL_CHANNEL, CHAT, etc.) */\n channelType: 'TELEPHONY' | 'EMAIL' | 'FAX' | 'CHAT' | 'VIDEO' | 'OTHERS' | 'SOCIAL_CHANNEL';\n /** Social channel type for SOCIAL_CHANNEL channelType */\n socialChannelType?:\n | 'MESSAGEBIRD'\n | 'MESSENGER'\n | 'WHATSAPP'\n | 'APPLE_BUSINESS_CHAT'\n | 'GOOGLE_BUSINESS_MESSAGES';\n /** Service level threshold in seconds */\n serviceLevelThreshold: number;\n /** Maximum number of simultaneous contacts */\n maxActiveContacts: number;\n /** Maximum time in queue in seconds */\n maxTimeInQueue: number;\n /** Default music in queue media file ID */\n defaultMusicInQueueMediaFileId: string;\n /** Timezone for routing strategies */\n timezone?: string;\n /** Whether the queue is active */\n active: boolean;\n /** Whether outdial campaign is enabled */\n outdialCampaignEnabled?: boolean;\n /** Whether monitoring is permitted */\n monitoringPermitted: boolean;\n /** Whether parking is permitted */\n parkingPermitted: boolean;\n /** Whether recording is permitted */\n recordingPermitted: boolean;\n /** Whether recording all calls is permitted */\n recordingAllCallsPermitted: boolean;\n /** Whether pausing recording is permitted */\n pauseRecordingPermitted: boolean;\n /** Recording pause duration in seconds */\n recordingPauseDuration?: number;\n /** Control flow script URL */\n controlFlowScriptUrl: string;\n /** IVR requeue URL */\n ivrRequeueUrl: string;\n /** Overflow number for telephony */\n overflowNumber?: string;\n /** Vendor ID */\n vendorId?: string;\n /** Routing type */\n routingType: 'LONGEST_AVAILABLE_AGENT' | 'SKILLS_BASED' | 'CIRCULAR' | 'LINEAR';\n /** Skills-based routing type */\n skillBasedRoutingType?: 'LONGEST_AVAILABLE_AGENT' | 'BEST_AVAILABLE_AGENT';\n /** Queue routing type */\n queueRoutingType: 'TEAM_BASED' | 'SKILL_BASED' | 'AGENT_BASED';\n /** Queue skill requirements */\n queueSkillRequirements?: QueueSkillRequirement[];\n /** List of agents for agent-based queue */\n agents?: QueueAgent[];\n /** Call distribution groups */\n callDistributionGroups: CallDistributionGroup[];\n /** XSP version */\n xspVersion?: string;\n /** Subscription ID */\n subscriptionId?: string;\n /** Assistant skill mapping */\n assistantSkill?: AssistantSkillMapping;\n /** Whether this is a system default queue */\n systemDefault?: boolean;\n /** User who last updated agents list */\n agentsLastUpdatedByUserName?: string;\n /** Email of user who last updated agents list */\n agentsLastUpdatedByUserEmailPrefix?: string;\n /** When agents list was last updated */\n agentsLastUpdatedTime?: number;\n /** Creation timestamp in epoch millis */\n createdTime?: number;\n /** Last updated timestamp in epoch millis */\n lastUpdatedTime?: number;\n}\n\nexport type ContactServiceQueuesResponse = PaginatedResponse<ContactServiceQueue>;\n\nexport interface ContactServiceQueueSearchParams extends BaseSearchParams {\n desktopProfileFilter?: boolean;\n provisioningView?: boolean;\n singleObjectResponse?: boolean;\n}\n\n/**\n * Response type for buddy agents query operations.\n * Either a success response with list of buddy agents or an error.\n * @public\n * @example\n * function handleBuddyAgents(resp: BuddyAgentsResponse) { ... }\n */\nexport type BuddyAgentsResponse = Agent.BuddyAgentsSuccess | Error;\n\n/**\n * Response type for device type update operations.\n * Either a success response with update confirmation or an error.\n * @public\n * @example\n * function handleUpdateDeviceType(resp: UpdateDeviceTypeResponse) { ... }\n */\nexport type UpdateDeviceTypeResponse = Agent.DeviceTypeUpdateSuccess | Error;\n\n/**\n * Supported transcript control actions for AI Assistant events.\n * @public\n * @example\n * const action: TranscriptAction = 'START';\n * @ignore\n */\nexport type TranscriptAction = 'START' | 'STOP';\n\n/**\n * Parameters used to request an AI Assistant suggested response.\n * @public\n * @example\n * const params: SuggestedResponseParams = {\n * interactionId: 'interaction-123',\n * actionTimeStamp: Date.now(),\n * context: 'Need help with credit card payment due date',\n * };\n */\nexport type SuggestedResponseParams = {\n /** Agent identifier */\n agentId: string;\n /** Interaction identifier for which suggestion should be generated */\n interactionId: string;\n /** Optional additional context that should refine the suggestion */\n context?: string;\n /** Optional language code for suggestions (for example, 'en'). Defaults to 'en'. */\n languageCode?: string;\n};\n\n/**\n * Supported AI Assistant event categories.\n * @public\n * @example\n * const eventType: AIAssistantEventType = AIAssistantEventType.CUSTOM_EVENT;\n * @ignore\n */\nexport const AIAssistantEventType = {\n /** Custom AI Assistant event */\n CUSTOM_EVENT: 'CUSTOM_EVENT',\n /** CTI-backed AI Assistant event */\n CTI_EVENT: 'CTI_EVENT',\n} as const;\n\n/**\n * Union type of AI Assistant event categories.\n * @public\n * @example\n * function send(type: AIAssistantEventType) { ... }\n * @ignore\n */\nexport type AIAssistantEventType = Enum<typeof AIAssistantEventType>;\n\n/**\n * Supported AI Assistant event names.\n * @public\n * @example\n * const name: AIAssistantEventName = AIAssistantEventName.GET_TRANSCRIPTS;\n * @ignore\n */\nexport const AIAssistantEventName = {\n /** Request transcript streaming for an interaction */\n GET_TRANSCRIPTS: 'GET_TRANSCRIPTS',\n /** Request a suggested response for an interaction */\n GET_SUGGESTIONS: 'GET_SUGGESTIONS',\n /** Add extra context to refine a suggested response */\n ADD_SUGGESTIONS_EXTRA_CONTEXT: 'ADD_SUGGESTIONS_EXTRA_CONTEXT',\n /** Request mid-call summary generation */\n GET_MID_CALL_SUMMARY: 'GET_MID_CALL_SUMMARY',\n /** Request post-call summary generation */\n GET_POST_CALL_SUMMARY: 'GET_POST_CALL_SUMMARY',\n /** Mid-call summary response event */\n MID_CALL_SUMMARY_RESPONSE: 'MID_CALL_SUMMARY_RESPONSE',\n /** Post-call summary response event */\n POST_CALL_SUMMARY_RESPONSE: 'POST_CALL_SUMMARY_RESPONSE',\n /** Suggested digital response event */\n SUGGESTED_RESPONSES_DIGITAL: 'SUGGESTED_RESPONSES_DIGITAL',\n} as const;\n\n/**\n * Union type of AI Assistant event names.\n * @public\n * @example\n * function handle(name: AIAssistantEventName) { ... }\n * @ignore\n */\nexport type AIAssistantEventName = Enum<typeof AIAssistantEventName>;\n\n/**\n * A single transcript message entry returned by AI Assistant APIs.\n * @public\n * @example\n * const message: TranscriptMessage = { role: 'AGENT', content: 'Hello', messageId: '1', publishTimestamp: Date.now() };\n *\n */\nexport type TranscriptMessage = {\n /** Speaker role for this message */\n role: string;\n /** Transcript chunk content */\n content: string;\n /** Unique message identifier */\n messageId: string;\n /** Message publish timestamp (epoch milliseconds) */\n publishTimestamp: number;\n};\n\n/**\n * Response payload for historic transcripts API.\n * @public\n * @example\n * const resp: HistoricTranscriptsResponse = { orgId: 'org', agentId: 'agent', conversationId: null, interactionId: 'int', source: 'AI', data: [] };\n *\n */\nexport type HistoricTranscriptsResponse = {\n /** Organization identifier */\n orgId: string;\n /** Agent identifier */\n agentId: string;\n /** Conversation identifier when available */\n conversationId: string | null;\n /** Interaction identifier */\n interactionId: string;\n /** Data source identifier */\n source: string;\n /** Transcript messages */\n data: TranscriptMessage[];\n};\n"],"mappings":";;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1B;EACAE,GAAG,EAAE,KAAK;EACV;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IAQYC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa;EAGvB;EAHUA,aAAa;EAKvB;EALUA,aAAa;EAOvB;EAPUA,aAAa;EASvB;EATUA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAazB;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAqFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG;EACzB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,OAAO,EAAE;AACX,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAiBA;AACA;AACA;;AAgBA;AACA;AACA;;AAkCA;AACA;AACA;AACA;;AAmGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAX,OAAA,CAAAW,oBAAA,GAAG;EAClC;EACAC,YAAY,EAAE,cAAc;EAC5B;EACAC,SAAS,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAAd,OAAA,CAAAc,oBAAA,GAAG;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,eAAe,EAAE,iBAAiB;EAClC;EACAC,6BAA6B,EAAE,+BAA+B;EAC9D;EACAC,oBAAoB,EAAE,sBAAsB;EAC5C;EACAC,qBAAqB,EAAE,uBAAuB;EAC9C;EACAC,yBAAyB,EAAE,2BAA2B;EACtD;EACAC,0BAA0B,EAAE,4BAA4B;EACxD;EACAC,2BAA2B,EAAE;AAC/B,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
package/dist/webex.js CHANGED
@@ -41,7 +41,7 @@ if (!global.Buffer) {
41
41
  */
42
42
  const Webex = _webexCore.default.extend({
43
43
  webex: true,
44
- version: `3.12.0-task-refactor.10`
44
+ version: `3.12.0-task-refactor.11`
45
45
  });
46
46
 
47
47
  /**
package/package.json CHANGED
@@ -83,5 +83,5 @@
83
83
  "typedoc": "^0.25.0",
84
84
  "typescript": "5.4.5"
85
85
  },
86
- "version": "3.12.0-task-refactor.10"
86
+ "version": "3.12.0-task-refactor.11"
87
87
  }