@webex/contact-center 3.8.1 → 3.9.0-multipleLLM.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cc.js +106 -63
- package/dist/cc.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/logger-proxy.js +24 -1
- package/dist/logger-proxy.js.map +1 -1
- package/dist/metrics/MetricsManager.js +1 -1
- package/dist/metrics/MetricsManager.js.map +1 -1
- package/dist/metrics/behavioral-events.js +88 -0
- package/dist/metrics/behavioral-events.js.map +1 -1
- package/dist/metrics/constants.js +26 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/services/AddressBook.js +271 -0
- package/dist/services/AddressBook.js.map +1 -0
- package/dist/services/EntryPoint.js +227 -0
- package/dist/services/EntryPoint.js.map +1 -0
- package/dist/services/Queue.js +261 -0
- package/dist/services/Queue.js.map +1 -0
- package/dist/services/config/constants.js +24 -2
- package/dist/services/config/constants.js.map +1 -1
- package/dist/services/config/index.js +1 -43
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/config/types.js +22 -5
- package/dist/services/config/types.js.map +1 -1
- package/dist/services/core/GlobalTypes.js.map +1 -1
- package/dist/services/core/Utils.js +162 -2
- package/dist/services/core/Utils.js.map +1 -1
- package/dist/services/core/aqm-reqs.js +0 -4
- package/dist/services/core/aqm-reqs.js.map +1 -1
- package/dist/services/core/websocket/WebSocketManager.js +0 -4
- package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
- package/dist/services/task/TaskManager.js +74 -2
- package/dist/services/task/TaskManager.js.map +1 -1
- package/dist/services/task/constants.js +7 -1
- package/dist/services/task/constants.js.map +1 -1
- package/dist/services/task/contact.js +86 -0
- package/dist/services/task/contact.js.map +1 -1
- package/dist/services/task/index.js +384 -72
- package/dist/services/task/index.js.map +1 -1
- package/dist/services/task/types.js +14 -0
- package/dist/services/task/types.js.map +1 -1
- package/dist/types/cc.d.ts +77 -43
- package/dist/types/index.d.ts +8 -3
- package/dist/types/metrics/constants.d.ts +20 -0
- package/dist/types/services/AddressBook.d.ts +74 -0
- package/dist/types/services/EntryPoint.d.ts +67 -0
- package/dist/types/services/Queue.d.ts +76 -0
- package/dist/types/services/config/constants.d.ts +23 -1
- package/dist/types/services/config/index.d.ts +1 -14
- package/dist/types/services/config/types.d.ts +44 -64
- package/dist/types/services/core/GlobalTypes.d.ts +25 -0
- package/dist/types/services/core/Utils.d.ts +40 -1
- package/dist/types/services/task/constants.d.ts +6 -0
- package/dist/types/services/task/contact.d.ts +10 -0
- package/dist/types/services/task/index.d.ts +44 -2
- package/dist/types/services/task/types.d.ts +123 -1
- package/dist/types/types.d.ts +162 -0
- package/dist/types/utils/PageCache.d.ts +173 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/PageCache.js +192 -0
- package/dist/utils/PageCache.js.map +1 -0
- package/dist/webex.js +1 -1
- package/package.json +10 -10
- package/src/cc.ts +122 -81
- package/src/index.ts +19 -3
- package/src/logger-proxy.ts +24 -1
- package/src/metrics/MetricsManager.ts +1 -1
- package/src/metrics/behavioral-events.ts +92 -0
- package/src/metrics/constants.ts +30 -0
- package/src/services/AddressBook.ts +291 -0
- package/src/services/EntryPoint.ts +241 -0
- package/src/services/Queue.ts +277 -0
- package/src/services/config/constants.ts +26 -2
- package/src/services/config/index.ts +1 -55
- package/src/services/config/types.ts +22 -65
- package/src/services/core/GlobalTypes.ts +27 -0
- package/src/services/core/Utils.ts +199 -1
- package/src/services/core/aqm-reqs.ts +0 -5
- package/src/services/core/websocket/WebSocketManager.ts +0 -4
- package/src/services/task/TaskManager.ts +79 -3
- package/src/services/task/constants.ts +6 -0
- package/src/services/task/contact.ts +80 -0
- package/src/services/task/index.ts +457 -57
- package/src/services/task/types.ts +133 -0
- package/src/types.ts +180 -0
- package/src/utils/PageCache.ts +252 -0
- package/test/unit/spec/cc.ts +31 -82
- package/test/unit/spec/metrics/MetricsManager.ts +0 -1
- package/test/unit/spec/metrics/behavioral-events.ts +56 -0
- package/test/unit/spec/services/AddressBook.ts +332 -0
- package/test/unit/spec/services/EntryPoint.ts +259 -0
- package/test/unit/spec/services/Queue.ts +323 -0
- package/test/unit/spec/services/config/index.ts +0 -71
- package/test/unit/spec/services/core/Utils.ts +50 -0
- package/test/unit/spec/services/core/aqm-reqs.ts +1 -3
- package/test/unit/spec/services/core/websocket/WebSocketManager.ts +0 -4
- package/test/unit/spec/services/task/TaskManager.ts +145 -1
- package/test/unit/spec/services/task/contact.ts +31 -1
- package/test/unit/spec/services/task/index.ts +410 -123
- package/umd/contact-center.min.js +2 -2
- package/umd/contact-center.min.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DESTINATION_TYPE","exports","QUEUE","DIALNUMBER","AGENT","ENTRYPOINT","CONSULT_TRANSFER_DESTINATION_TYPE","MEDIA_CHANNEL","EMAIL","CHAT","TELEPHONY","SOCIAL","SMS","FACEBOOK","WHATSAPP","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["import {CallId} from '@webex/calling/dist/types/common/types';\nimport EventEmitter from 'events';\nimport {Msg} from '../core/GlobalTypes';\nimport AutoWrapup from './AutoWrapup';\n\n/**\n * Unique identifier for a task in the contact center system\n * @public\n */\nexport type TaskId = string;\n\n/**\n * Helper type for creating enum-like objects with type safety\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * Defines the valid destination types for routing tasks within the contact center\n * Used to specify where a task should be directed\n * @public\n */\nexport const DESTINATION_TYPE = {\n /** Route task to a specific queue */\n QUEUE: 'queue',\n /** Route task to a specific dial number */\n DIALNUMBER: 'dialNumber',\n /** Route task to a specific agent */\n AGENT: 'agent',\n /** Route task to an entry point (supported only for consult operations) */\n ENTRYPOINT: 'entryPoint',\n};\n\n/**\n * Type representing valid destination types for task routing\n * Derived from the DESTINATION_TYPE constant\n * @public\n */\nexport type DestinationType = Enum<typeof DESTINATION_TYPE>;\n\n/**\n * Defines the valid destination types for consult transfer operations\n * Used when transferring a task after consultation\n * @public\n */\nexport const CONSULT_TRANSFER_DESTINATION_TYPE = {\n /** Transfer to a specific agent */\n AGENT: 'agent',\n /** Transfer to an entry point */\n ENTRYPOINT: 'entryPoint',\n /** Transfer to a dial number */\n DIALNUMBER: 'dialNumber',\n /** Transfer to a queue */\n QUEUE: 'queue',\n};\n\n/**\n * Type representing valid destination types for consult transfers\n * Derived from the CONSULT_TRANSFER_DESTINATION_TYPE constant\n * @public\n */\nexport type ConsultTransferDestinationType = Enum<typeof CONSULT_TRANSFER_DESTINATION_TYPE>;\n\n/**\n * Defines all supported media channel types for customer interactions\n * These represent the different ways customers can communicate with agents\n * @public\n */\nexport const MEDIA_CHANNEL = {\n /** Email-based communication channel */\n EMAIL: 'email',\n /** Web-based chat communication channel */\n CHAT: 'chat',\n /** Voice/phone communication channel */\n TELEPHONY: 'telephony',\n /** Social media platform communication channel */\n SOCIAL: 'social',\n /** SMS text messaging communication channel */\n SMS: 'sms',\n /** Facebook Messenger communication channel */\n FACEBOOK: 'facebook',\n /** WhatsApp messaging communication channel */\n WHATSAPP: 'whatsapp',\n} as const;\n\n/**\n * Type representing valid media channels\n * Derived from the MEDIA_CHANNEL constant\n * @public\n */\nexport type MEDIA_CHANNEL = Enum<typeof MEDIA_CHANNEL>;\n\n/**\n * Enumeration of all task-related events that can occur in the contact center system\n * These events represent different states and actions in the task lifecycle\n * @public\n */\nexport enum TASK_EVENTS {\n /**\n * Triggered when a new task is received by the system\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {\n * console.log('New task received:', task.data.interactionId);\n * // Handle incoming task\n * });\n * ```\n */\n TASK_INCOMING = 'task:incoming',\n\n /**\n * Triggered when a task is successfully assigned to an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {\n * console.log('Task assigned:', task.data.interactionId);\n * // Begin handling the assigned task\n * });\n * ```\n */\n TASK_ASSIGNED = 'task:assigned',\n\n /**\n * Triggered when the media state of a task changes\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {\n * // Handle media track updates\n * });\n * ```\n */\n TASK_MEDIA = 'task:media',\n\n /**\n * Triggered when a task is removed from an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {\n * console.log('Task unassigned:', task.data.interactionId);\n * // Clean up task resources\n * });\n * ```\n */\n TASK_UNASSIGNED = 'task:unassigned',\n\n /**\n * Triggered when a task is placed on hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {\n * console.log('Task placed on hold:', task.data.interactionId);\n * // Update UI to show hold state\n * });\n * ```\n */\n TASK_HOLD = 'task:hold',\n\n /**\n * Triggered when a task is resumed from hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RESUME, (task: ITask) => {\n * console.log('Task resumed from hold:', task.data.interactionId);\n * // Update UI to show active state\n * });\n * ```\n */\n TASK_RESUME = 'task:resume',\n\n /**\n * Triggered when a consultation session ends\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {\n * console.log('Consultation ended:', task.data.interactionId);\n * // Clean up consultation resources\n * });\n * ```\n */\n TASK_CONSULT_END = 'task:consultEnd',\n\n /**\n * Triggered when a queue consultation is cancelled\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {\n * console.log('Queue consultation cancelled:', task.data.interactionId);\n * // Handle consultation cancellation\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_CANCELLED = 'task:consultQueueCancelled',\n\n /**\n * Triggered when a queue consultation fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {\n * console.log('Queue consultation failed:', task.data.interactionId);\n * // Handle consultation failure\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_FAILED = 'task:consultQueueFailed',\n\n /**\n * Triggered when a consultation request is accepted\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {\n * console.log('Consultation accepted:', task.data.interactionId);\n * // Begin consultation\n * });\n * ```\n */\n TASK_CONSULT_ACCEPTED = 'task:consultAccepted',\n\n /**\n * Triggered when consultation is in progress\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {\n * console.log('Consulting in progress:', task.data.interactionId);\n * // Handle ongoing consultation\n * });\n * ```\n */\n TASK_CONSULTING = 'task:consulting',\n\n /**\n * Triggered when a new consultation is created\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {\n * console.log('Consultation created:', task.data.interactionId);\n * // Initialize consultation\n * });\n * ```\n */\n TASK_CONSULT_CREATED = 'task:consultCreated',\n\n /**\n * Triggered when a consultation is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {\n * console.log('Consultation offered:', task.data.interactionId);\n * // Handle consultation offer\n * });\n * ```\n */\n TASK_OFFER_CONSULT = 'task:offerConsult',\n\n /**\n * Triggered when a task is completed/terminated\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_END, (task: ITask) => {\n * console.log('Task ended:', task.data.interactionId);\n * // Clean up and finalize task\n * });\n * ```\n */\n TASK_END = 'task:end',\n\n /**\n * Triggered when a task enters wrap-up state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {\n * console.log('Task in wrap-up:', task.data.interactionId);\n * // Begin wrap-up process\n * });\n * ```\n */\n TASK_WRAPUP = 'task:wrapup',\n\n /**\n * Triggered when task wrap-up is completed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {\n * console.log('Task wrapped up:', task.data.interactionId);\n * // Finalize task completion\n * });\n * ```\n */\n TASK_WRAPPEDUP = 'task:wrappedup',\n\n /**\n * Triggered when recording is paused\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {\n * console.log('Recording paused:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_PAUSED = 'task:recordingPaused',\n\n /**\n * Triggered when recording pause attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {\n * console.log('Recording pause failed:', task.data.interactionId);\n * // Handle pause failure\n * });\n * ```\n */\n TASK_RECORDING_PAUSE_FAILED = 'task:recordingPauseFailed',\n\n /**\n * Triggered when recording is resumed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {\n * console.log('Recording resumed:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_RESUMED = 'task:recordingResumed',\n\n /**\n * Triggered when recording resume attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {\n * console.log('Recording resume failed:', task.data.interactionId);\n * // Handle resume failure\n * });\n * ```\n */\n TASK_RECORDING_RESUME_FAILED = 'task:recordingResumeFailed',\n\n /**\n * Triggered when a task is rejected/unanswered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {\n * console.log('Task rejected:', task.data.interactionId);\n * // Handle task rejection\n * });\n * ```\n */\n TASK_REJECT = 'task:rejected',\n\n /**\n * Triggered when 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/**\n * Represents a customer interaction within the contact center system\n * Contains comprehensive details about an ongoing customer interaction\n * @public\n */\nexport type Interaction = {\n /** Indicates if the interaction is managed by Flow Control */\n isFcManaged: boolean;\n /** Indicates if the interaction has been terminated */\n isTerminated: boolean;\n /** The type of media channel for this interaction */\n mediaType: MEDIA_CHANNEL;\n /** List of previous virtual teams that handled this interaction */\n previousVTeams: string[];\n /** Current state of the interaction */\n state: string;\n /** Current virtual team handling the interaction */\n currentVTeam: string;\n /** List of participants in the interaction */\n participants: any; // TODO: Define specific participant type\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Timestamp when the interaction was created */\n createdTimestamp?: number;\n /** Indicates if wrap-up assistance is enabled */\n isWrapUpAssist?: boolean;\n /** Detailed call processing information and metadata */\n callProcessingDetails: {\n /** Name of the Queue Manager handling this interaction */\n QMgrName: string;\n /** Indicates if the task should be self-serviced */\n taskToBeSelfServiced: string;\n /** Automatic Number Identification (caller's number) */\n ani: string;\n /** Display version of the ANI */\n displayAni: string;\n /** Dialed Number Identification Service number */\n dnis: string;\n /** Tenant identifier */\n tenantId: string;\n /** Queue identifier */\n QueueId: string;\n /** Virtual team identifier */\n vteamId: string;\n /** Indicates if pause/resume functionality is enabled */\n pauseResumeEnabled?: string;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Indicates if the interaction is currently paused */\n isPaused?: string;\n /** Indicates if recording is in progress */\n recordInProgress?: string;\n /** Indicates if recording has started */\n recordingStarted?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: string;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: string;\n /** IVR conversation transcript */\n convIvrTranscript?: string;\n /** Customer's name */\n customerName: string;\n /** Name of the virtual team */\n virtualTeamName: string;\n /** RONA (Redirection on No Answer) timeout in seconds */\n ronaTimeout: string;\n /** Category of the interaction */\n category: string;\n /** Reason for the interaction */\n reason: string;\n /** Source number for the interaction */\n sourceNumber: string;\n /** Source page that initiated the interaction */\n sourcePage: string;\n /** Application user identifier */\n appUser: string;\n /** Customer's contact number */\n customerNumber: string;\n /** Code indicating the reason for interaction */\n reasonCode: string;\n /** Path taken through the IVR system */\n IvrPath: string;\n /** Identifier for the IVR path */\n pathId: string;\n /** Email address or contact point that initiated the interaction */\n fromAddress: string;\n /** Identifier of the parent interaction for related interactions */\n parentInteractionId?: string;\n /** Identifier of the child interaction for related interactions */\n childInteractionId?: string;\n /** Type of relationship between parent and child interactions */\n relationshipType?: string;\n /** ANI of the parent interaction */\n parent_ANI?: string;\n /** DNIS of the parent interaction */\n parent_DNIS?: string;\n /** Indicates if the consulted destination agent has joined */\n consultDestinationAgentJoined?: boolean | string;\n /** Name of the destination agent for consultation */\n consultDestinationAgentName?: string;\n /** DN of the parent interaction's agent */\n parent_Agent_DN?: string;\n /** Name of the parent interaction's agent */\n parent_Agent_Name?: string;\n /** Team name of the parent interaction's agent */\n parent_Agent_TeamName?: string;\n /** Indicates if the interaction is in conference mode */\n isConferencing?: string;\n /** Type of monitoring being performed */\n monitorType?: string;\n /** Name of the workflow being executed */\n workflowName?: string;\n /** Identifier of the workflow */\n workflowId?: string;\n /** Indicates if monitoring is in invisible mode */\n monitoringInvisibleMode?: string;\n /** Identifier for the monitoring request */\n monitoringRequestId?: string;\n /** Timeout for participant invitation */\n participantInviteTimeout?: string;\n /** Filename for music on hold */\n mohFileName?: string;\n /** Flag for continuing recording during transfer */\n CONTINUE_RECORDING_ON_TRANSFER?: string;\n /** Entry point identifier */\n EP_ID?: string;\n /** Type of routing being used */\n ROUTING_TYPE?: string;\n /** Events registered with Flow Control Engine */\n fceRegisteredEvents?: string;\n /** Indicates if the interaction is parked */\n isParked?: string;\n /** Priority level of the interaction */\n priority?: string;\n /** Identifier for the routing strategy */\n routingStrategyId?: string;\n /** Current state of monitoring */\n monitoringState?: string;\n /** Indicates if blind transfer is in progress */\n BLIND_TRANSFER_IN_PROGRESS?: boolean;\n /** Desktop view configuration for Flow Control */\n fcDesktopView?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Media-specific information for the interaction */\n media: Record<\n string,\n {\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of media channel */\n mediaType: MEDIA_CHANNEL;\n /** Media manager handling this media */\n mediaMgr: string;\n /** List of participant identifiers */\n participants: string[];\n /** Type of media */\n mType: string;\n /** Indicates if media is on hold */\n isHold: boolean;\n /** Timestamp when media was put on hold */\n holdTimestamp: number | null;\n }\n >;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: MEDIA_CHANNEL;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Parameters passed through the call flow */\n callFlowParams: Record<\n string,\n {\n /** Name of the parameter */\n name: string;\n /** Qualifier for the parameter */\n qualifier: string;\n /** Description of the parameter */\n description: string;\n /** Data type of the parameter value */\n valueDataType: string;\n /** Value of the parameter */\n value: string;\n }\n >;\n};\n\n/**\n * Task payload containing detailed information about a contact center task\n * This structure encapsulates all relevant data for task management\n * @public\n */\nexport type TaskData = {\n /** Unique identifier for the media resource handling this task */\n mediaResourceId: string;\n /** Type of event that triggered this task data */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Identifier of the agent handling the task */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the task */\n trackingId: string;\n /** Media resource identifier for consultation operations */\n consultMediaResourceId: string;\n /** Detailed interaction information */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the task is from the owner */\n fromOwner?: boolean;\n /** Indicates if the task is to the owner */\n toOwner?: boolean;\n /** Identifier for child interaction in consult/transfer scenarios */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the task */\n owner: string;\n /** Queue manager handling the task */\n queueMgr: string;\n /** Name of the queue where task is queued */\n queueName?: string;\n /** Type of the task */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the task is in consultation state */\n isConsulted?: boolean;\n /** Indicates if the task is in conference state */\n isConferencing: boolean;\n /** 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 /** Indicates if wrap-up is required for this task */\n wrapUpRequired?: boolean;\n};\n\n/**\n * Type representing an agent contact message within the contact center system\n * Contains comprehensive interaction and task related details for agent operations\n * @public\n */\nexport type AgentContact = Msg<{\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of the event (e.g., 'AgentDesktopMessage') */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Unique identifier of the agent handling the contact */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the contact */\n trackingId: string;\n /** Media resource identifier for consult operations */\n consultMediaResourceId: string;\n /** Detailed interaction information including media and participant data */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the message is from the owner of the interaction */\n fromOwner?: boolean;\n /** Indicates if the message is to the owner of the interaction */\n toOwner?: boolean;\n /** Identifier for child interaction in case of consult/transfer */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the interaction */\n owner: string;\n /** Queue manager handling the interaction */\n queueMgr: string;\n /** Name of the queue where interaction is queued */\n queueName?: string;\n /** Type of the contact/interaction */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the interaction is in consult state */\n isConsulted?: boolean;\n /** Indicates if the interaction is in conference state */\n isConferencing: boolean;\n /** Identifier of the agent who last updated the interaction */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the interaction was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including media and state information */\n task?: Interaction;\n /** Identifier of the supervisor monitoring the interaction */\n supervisorId?: string;\n /** Type of monitoring (e.g., 'SILENT', 'BARGE_IN') */\n monitorType?: string;\n /** Dial number of the supervisor */\n supervisorDN?: string;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel */\n reservedAgentChannelId?: string;\n /** Current monitoring state information */\n monitoringState?: {\n /** Type of monitoring state */\n type: string;\n };\n /** Name of the supervisor monitoring the interaction */\n supervisorName?: string;\n}>;\n\n/**\n * Information about a virtual team in the contact center\n * @ignore\n */\nexport type VTeam = {\n /** Profile ID of the agent in the virtual team */\n agentProfileId: string;\n /** Session ID of the agent in the virtual team */\n agentSessionId: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Type of the virtual team */\n type: string;\n /** Optional tracking identifier */\n trackingId?: string;\n};\n\n/**\n * Detailed information about a virtual team configuration\n * @ignore\n */\nexport type VteamDetails = {\n /** Name of the virtual team */\n name: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Unique identifier for the virtual team */\n id: string;\n /** Type of the virtual team */\n type: string;\n /** ID of the analyzer associated with the team */\n analyzerId: string;\n};\n\n/**\n * Response type for successful virtual team operations\n * Contains details about virtual teams and their capabilities\n * @ignore\n */\nexport type VTeamSuccess = Msg<{\n /** Response data containing team information */\n data: {\n /** List of virtual team details */\n vteamList: Array<VteamDetails>;\n /** Whether queue consultation is allowed */\n allowConsultToQueue: boolean;\n };\n /** Method name from JavaScript */\n jsMethod: string;\n /** Data related to the call */\n callData: string;\n /** Session ID of the agent */\n agentSessionId: string;\n}>;\n\n/**\n * Parameters for putting a task on hold or resuming from hold\n * @public\n */\nexport type HoldResumePayload = {\n /** Unique identifier for the media resource to hold/resume */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for resuming a task's recording\n * @public\n */\nexport type ResumeRecordingPayload = {\n /** Indicates if the recording was automatically resumed */\n autoResumed: boolean;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayLoad = {\n /** Destination identifier where the task will be transferred to */\n to: string;\n /** Type of the destination (queue, agent, etc.) */\n destinationType: DestinationType;\n};\n\n/**\n * Parameters for initiating a consultative transfer\n * @public\n */\nexport type ConsultTransferPayLoad = {\n /** Destination identifier for the consultation transfer */\n to: string;\n /** Type of the consultation transfer destination */\n destinationType: ConsultTransferDestinationType;\n};\n\n/**\n * Parameters for initiating a consultation with another agent or queue\n * @public\n */\nexport type ConsultPayload = {\n /** Destination identifier for the consultation */\n to: string | undefined;\n /** Type of the consultation destination (agent, queue, etc.) */\n destinationType: DestinationType;\n /** Whether to hold other participants during consultation (always true) */\n holdParticipants?: boolean;\n};\n\n/**\n * Parameters for ending a consultation task\n * @public\n */\nexport type ConsultEndPayload = {\n /** Indicates if this is a consultation operation */\n isConsult: boolean;\n /** Indicates if this involves a secondary entry point or DN agent */\n isSecondaryEpDnAgent?: boolean;\n /** Optional queue identifier for the consultation */\n queueId?: string;\n /** Identifier of the task being consulted */\n taskId: string;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayload = {\n /** Destination identifier where the task will be transferred */\n to: string | undefined;\n /** Type of the transfer destination */\n destinationType: DestinationType;\n};\n\n/**\n * API payload for ending a consultation\n * This is the actual payload that is sent to the developer API\n * @public\n */\nexport type ConsultEndAPIPayload = {\n /** Optional identifier of the queue involved in the consultation */\n queueId?: string;\n};\n\n/**\n * Data required for consulting and conferencing operations\n * @public\n */\nexport type ConsultConferenceData = {\n /** Identifier of the agent initiating consult/conference */\n agentId?: string;\n /** Target destination for the consult/conference */\n to: string | undefined;\n /** Type of destination (e.g., 'agent', 'queue') */\n destinationType: string;\n};\n\n/**\n * Parameters required for cancelling a consult to queue operation\n * @public\n */\nexport type cancelCtq = {\n /** Identifier of the agent cancelling the CTQ */\n agentId: string;\n /** Identifier of the queue where consult was initiated */\n queueId: string;\n};\n\n/**\n * Parameters required for declining a task\n * @public\n */\nexport type declinePayload = {\n /** Identifier of the media resource to decline */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for wrapping up a task with relevant completion details\n * @public\n */\nexport type WrapupPayLoad = {\n /** The reason provided for wrapping up the task */\n wrapUpReason: string;\n /** Auxiliary code identifier associated with the wrap-up state */\n auxCodeId: string;\n};\n\n/**\n * Configuration parameters for initiating outbound dialer tasks\n * @public\n */\nexport type DialerPayload = {\n /** An entryPointId for respective task */\n entryPointId: string;\n /** A valid customer DN, on which the response is expected, maximum length 36 characters */\n destination: string;\n /** The direction of the call */\n direction: 'OUTBOUND';\n /** Schema-free data tuples to pass specific data based on outboundType (max 30 tuples) */\n attributes: {[key: string]: string};\n /** The media type for the request */\n mediaType: 'telephony' | 'chat' | 'social' | 'email';\n /** The outbound type for the task */\n outboundType: 'OUTDIAL' | 'CALLBACK' | 'EXECUTE_FLOW';\n};\n\n/**\n * Data structure for cleaning up contact resources\n * @public\n */\nexport type ContactCleanupData = {\n /** Type of cleanup operation being performed */\n type: string;\n /** Organization identifier where cleanup is occurring */\n orgId: string;\n /** Identifier of the agent associated with the contacts */\n agentId: string;\n /** Detailed data about the cleanup operation */\n data: {\n /** Type of event that triggered the cleanup */\n eventType: string;\n /** Identifier of the interaction being cleaned up */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Media manager handling the cleanup */\n mediaMgr: string;\n /** Tracking identifier for the cleanup operation */\n trackingId: string;\n /** Type of media being cleaned up */\n mediaType: string;\n /** Optional destination information */\n destination?: string;\n /** Whether this is a broadcast cleanup */\n broadcast: boolean;\n /** Type of cleanup being performed */\n type: string;\n };\n};\n\n/**\n * Response type for task public methods\n * Can be an {@link AgentContact} object containing updated task state,\n * an Error in case of failure, or void for operations that don't return data\n * @public\n */\nexport type TaskResponse = AgentContact | Error | void;\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends EventEmitter to support event-driven task updates\n */\nexport interface ITask extends EventEmitter {\n /**\n * Event data received in the Contact Center events.\n * Contains detailed task information including interaction details, media resources,\n * and participant data as defined in {@link TaskData}\n */\n data: TaskData;\n\n /**\n * Map associating tasks with their corresponding call identifiers.\n */\n webCallMap: Record<TaskId, CallId>;\n\n /**\n * Auto-wrapup timer for the task\n * This is used to automatically wrap up tasks after a specified duration\n * as defined in {@link AutoWrapup}\n */\n autoWrapup?: AutoWrapup;\n\n /**\n * cancels the auto-wrapup timer for the task\n * This method stops the auto-wrapup process if it is currently active\n * Note: This is supported only in single session mode. Not supported in multi-session mode.\n * @returns void\n */\n cancelAutoWrapupTimer(): void;\n\n /**\n * Deregisters all web call event listeners\n * Used when cleaning up task resources\n * @ignore\n */\n unregisterWebCallListeners(): void;\n\n /**\n * Updates the task data with new information\n * @param newData - Updated task data to apply, must conform to {@link TaskData} structure\n * @returns Updated task instance\n * @ignore\n */\n updateTaskData(newData: TaskData): ITask;\n\n /**\n * Answers or accepts an incoming task.\n * Once accepted, the task will be assigned to the agent and trigger a {@link TASK_EVENTS.TASK_ASSIGNED} event.\n * The response will contain updated agent contact information as defined in {@link AgentContact}.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * 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 * task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n\n /**\n * Places the current task on hold\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * task.hold();\n * ```\n */\n hold(): Promise<TaskResponse>;\n\n /**\n * Resumes a task that was previously on hold\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * task.resume();\n * ```\n */\n resume(): Promise<TaskResponse>;\n\n /**\n * Ends/terminates the current task\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * 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 * 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 * 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 * task.resumeRecording({\n * autoResumed: false\n * });\n * ```\n */\n resumeRecording(resumeRecordingPayload: ResumeRecordingPayload): Promise<TaskResponse>;\n}\n"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9B;EACAE,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMC,iCAAiC,GAAAL,OAAA,CAAAK,iCAAA,GAAG;EAC/C;EACAF,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAF,UAAU,EAAE,YAAY;EACxB;EACAD,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMK,aAAa,GAAAN,OAAA,CAAAM,aAAA,GAAG;EAC3B;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,MAAM,EAAE,QAAQ;EAChB;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAAd,OAAA,CAAAc,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAqRvB;AACA;AACA;AACA;AACA;AA6LA;AACA;AACA;AACA;AACA;AAsEA;AACA;AACA;AACA;AACA;AAmFA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AA+BA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"names":["DESTINATION_TYPE","exports","QUEUE","DIALNUMBER","AGENT","ENTRYPOINT","CONSULT_TRANSFER_DESTINATION_TYPE","MEDIA_CHANNEL","EMAIL","CHAT","TELEPHONY","SOCIAL","SMS","FACEBOOK","WHATSAPP","TASK_EVENTS"],"sources":["types.ts"],"sourcesContent":["import {CallId} from '@webex/calling/dist/types/common/types';\nimport EventEmitter from 'events';\nimport {Msg} from '../core/GlobalTypes';\nimport AutoWrapup from './AutoWrapup';\n\n/**\n * Unique identifier for a task in the contact center system\n * @public\n */\nexport type TaskId = string;\n\n/**\n * Helper type for creating enum-like objects with type safety\n * @internal\n */\ntype Enum<T extends Record<string, unknown>> = T[keyof T];\n\n/**\n * Defines the valid destination types for routing tasks within the contact center\n * Used to specify where a task should be directed\n * @public\n */\nexport const DESTINATION_TYPE = {\n /** Route task to a specific queue */\n QUEUE: 'queue',\n /** Route task to a specific dial number */\n DIALNUMBER: 'dialNumber',\n /** Route task to a specific agent */\n AGENT: 'agent',\n /** Route task to an entry point (supported only for consult operations) */\n ENTRYPOINT: 'entryPoint',\n};\n\n/**\n * Type representing valid destination types for task routing\n * Derived from the DESTINATION_TYPE constant\n * @public\n */\nexport type DestinationType = Enum<typeof DESTINATION_TYPE>;\n\n/**\n * Defines the valid destination types for consult transfer operations\n * Used when transferring a task after consultation\n * @public\n */\nexport const CONSULT_TRANSFER_DESTINATION_TYPE = {\n /** Transfer to a specific agent */\n AGENT: 'agent',\n /** Transfer to an entry point */\n ENTRYPOINT: 'entryPoint',\n /** Transfer to a dial number */\n DIALNUMBER: 'dialNumber',\n /** Transfer to a queue */\n QUEUE: 'queue',\n};\n\n/**\n * Type representing valid destination types for consult transfers\n * Derived from the CONSULT_TRANSFER_DESTINATION_TYPE constant\n * @public\n */\nexport type ConsultTransferDestinationType = Enum<typeof CONSULT_TRANSFER_DESTINATION_TYPE>;\n\n/**\n * Defines all supported media channel types for customer interactions\n * These represent the different ways customers can communicate with agents\n * @public\n */\nexport const MEDIA_CHANNEL = {\n /** Email-based communication channel */\n EMAIL: 'email',\n /** Web-based chat communication channel */\n CHAT: 'chat',\n /** Voice/phone communication channel */\n TELEPHONY: 'telephony',\n /** Social media platform communication channel */\n SOCIAL: 'social',\n /** SMS text messaging communication channel */\n SMS: 'sms',\n /** Facebook Messenger communication channel */\n FACEBOOK: 'facebook',\n /** WhatsApp messaging communication channel */\n WHATSAPP: 'whatsapp',\n} as const;\n\n/**\n * Type representing valid media channels\n * Derived from the MEDIA_CHANNEL constant\n * @public\n */\nexport type MEDIA_CHANNEL = Enum<typeof MEDIA_CHANNEL>;\n\n/**\n * Enumeration of all task-related events that can occur in the contact center system\n * These events represent different states and actions in the task lifecycle\n * @public\n */\nexport enum TASK_EVENTS {\n /**\n * Triggered when a new task is received by the system\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_INCOMING, (task: ITask) => {\n * console.log('New task received:', task.data.interactionId);\n * // Handle incoming task\n * });\n * ```\n */\n TASK_INCOMING = 'task:incoming',\n\n /**\n * Triggered when a task is successfully assigned to an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_ASSIGNED, (task: ITask) => {\n * console.log('Task assigned:', task.data.interactionId);\n * // Begin handling the assigned task\n * });\n * ```\n */\n TASK_ASSIGNED = 'task:assigned',\n\n /**\n * Triggered when the media state of a task changes\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_MEDIA, (track: MediaStreamTrack) => {\n * // Handle media track updates\n * });\n * ```\n */\n TASK_MEDIA = 'task:media',\n\n /**\n * Triggered when a task is removed from an agent\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_UNASSIGNED, (task: ITask) => {\n * console.log('Task unassigned:', task.data.interactionId);\n * // Clean up task resources\n * });\n * ```\n */\n TASK_UNASSIGNED = 'task:unassigned',\n\n /**\n * Triggered when a task is placed on hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_HOLD, (task: ITask) => {\n * console.log('Task placed on hold:', task.data.interactionId);\n * // Update UI to show hold state\n * });\n * ```\n */\n TASK_HOLD = 'task:hold',\n\n /**\n * Triggered when a task is resumed from hold\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RESUME, (task: ITask) => {\n * console.log('Task resumed from hold:', task.data.interactionId);\n * // Update UI to show active state\n * });\n * ```\n */\n TASK_RESUME = 'task:resume',\n\n /**\n * Triggered when a consultation session ends\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_END, (task: ITask) => {\n * console.log('Consultation ended:', task.data.interactionId);\n * // Clean up consultation resources\n * });\n * ```\n */\n TASK_CONSULT_END = 'task:consultEnd',\n\n /**\n * Triggered when a queue consultation is cancelled\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_CANCELLED, (task: ITask) => {\n * console.log('Queue consultation cancelled:', task.data.interactionId);\n * // Handle consultation cancellation\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_CANCELLED = 'task:consultQueueCancelled',\n\n /**\n * Triggered when a queue consultation fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_QUEUE_FAILED, (task: ITask) => {\n * console.log('Queue consultation failed:', task.data.interactionId);\n * // Handle consultation failure\n * });\n * ```\n */\n TASK_CONSULT_QUEUE_FAILED = 'task:consultQueueFailed',\n\n /**\n * Triggered when a consultation request is accepted\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_ACCEPTED, (task: ITask) => {\n * console.log('Consultation accepted:', task.data.interactionId);\n * // Begin consultation\n * });\n * ```\n */\n TASK_CONSULT_ACCEPTED = 'task:consultAccepted',\n\n /**\n * Triggered when consultation is in progress\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULTING, (task: ITask) => {\n * console.log('Consulting in progress:', task.data.interactionId);\n * // Handle ongoing consultation\n * });\n * ```\n */\n TASK_CONSULTING = 'task:consulting',\n\n /**\n * Triggered when a new consultation is created\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_CONSULT_CREATED, (task: ITask) => {\n * console.log('Consultation created:', task.data.interactionId);\n * // Initialize consultation\n * });\n * ```\n */\n TASK_CONSULT_CREATED = 'task:consultCreated',\n\n /**\n * Triggered when a consultation is offered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_OFFER_CONSULT, (task: ITask) => {\n * console.log('Consultation offered:', task.data.interactionId);\n * // Handle consultation offer\n * });\n * ```\n */\n TASK_OFFER_CONSULT = 'task:offerConsult',\n\n /**\n * Triggered when a task is completed/terminated\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_END, (task: ITask) => {\n * console.log('Task ended:', task.data.interactionId);\n * // Clean up and finalize task\n * });\n * ```\n */\n TASK_END = 'task:end',\n\n /**\n * Triggered when a task enters wrap-up state\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPUP, (task: ITask) => {\n * console.log('Task in wrap-up:', task.data.interactionId);\n * // Begin wrap-up process\n * });\n * ```\n */\n TASK_WRAPUP = 'task:wrapup',\n\n /**\n * Triggered when task wrap-up is completed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_WRAPPEDUP, (task: ITask) => {\n * console.log('Task wrapped up:', task.data.interactionId);\n * // Finalize task completion\n * });\n * ```\n */\n TASK_WRAPPEDUP = 'task:wrappedup',\n\n /**\n * Triggered when recording is paused\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSED, (task: ITask) => {\n * console.log('Recording paused:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_PAUSED = 'task:recordingPaused',\n\n /**\n * Triggered when recording pause attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_PAUSE_FAILED, (task: ITask) => {\n * console.log('Recording pause failed:', task.data.interactionId);\n * // Handle pause failure\n * });\n * ```\n */\n TASK_RECORDING_PAUSE_FAILED = 'task:recordingPauseFailed',\n\n /**\n * Triggered when recording is resumed\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUMED, (task: ITask) => {\n * console.log('Recording resumed:', task.data.interactionId);\n * // Update recording state\n * });\n * ```\n */\n TASK_RECORDING_RESUMED = 'task:recordingResumed',\n\n /**\n * Triggered when recording resume attempt fails\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_RECORDING_RESUME_FAILED, (task: ITask) => {\n * console.log('Recording resume failed:', task.data.interactionId);\n * // Handle resume failure\n * });\n * ```\n */\n TASK_RECORDING_RESUME_FAILED = 'task:recordingResumeFailed',\n\n /**\n * Triggered when a task is rejected/unanswered\n * @example\n * ```typescript\n * task.on(TASK_EVENTS.TASK_REJECT, (task: ITask) => {\n * console.log('Task rejected:', task.data.interactionId);\n * // Handle task rejection\n * });\n * ```\n */\n TASK_REJECT = 'task:rejected',\n\n /**\n * Triggered when 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 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/**\n * Represents a customer interaction within the contact center system\n * Contains comprehensive details about an ongoing customer interaction\n * @public\n */\nexport type Interaction = {\n /** Indicates if the interaction is managed by Flow Control */\n isFcManaged: boolean;\n /** Indicates if the interaction has been terminated */\n isTerminated: boolean;\n /** The type of media channel for this interaction */\n mediaType: MEDIA_CHANNEL;\n /** List of previous virtual teams that handled this interaction */\n previousVTeams: string[];\n /** Current state of the interaction */\n state: string;\n /** Current virtual team handling the interaction */\n currentVTeam: string;\n /** List of participants in the interaction */\n participants: any; // TODO: Define specific participant type\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Timestamp when the interaction was created */\n createdTimestamp?: number;\n /** Indicates if wrap-up assistance is enabled */\n isWrapUpAssist?: boolean;\n /** Detailed call processing information and metadata */\n callProcessingDetails: {\n /** Name of the Queue Manager handling this interaction */\n QMgrName: string;\n /** Indicates if the task should be self-serviced */\n taskToBeSelfServiced: string;\n /** Automatic Number Identification (caller's number) */\n ani: string;\n /** Display version of the ANI */\n displayAni: string;\n /** Dialed Number Identification Service number */\n dnis: string;\n /** Tenant identifier */\n tenantId: string;\n /** Queue identifier */\n QueueId: string;\n /** Virtual team identifier */\n vteamId: string;\n /** Indicates if pause/resume functionality is enabled */\n pauseResumeEnabled?: string;\n /** Duration of pause in seconds */\n pauseDuration?: string;\n /** Indicates if the interaction is currently paused */\n isPaused?: string;\n /** Indicates if recording is in progress */\n recordInProgress?: string;\n /** Indicates if recording has started */\n recordingStarted?: string;\n /** Indicates if Consult to Queue is in progress */\n ctqInProgress?: string;\n /** Indicates if outdial transfer to queue is enabled */\n outdialTransferToQueueEnabled?: string;\n /** IVR conversation transcript */\n convIvrTranscript?: string;\n /** Customer's name */\n customerName: string;\n /** Name of the virtual team */\n virtualTeamName: string;\n /** RONA (Redirection on No Answer) timeout in seconds */\n ronaTimeout: string;\n /** Category of the interaction */\n category: string;\n /** Reason for the interaction */\n reason: string;\n /** Source number for the interaction */\n sourceNumber: string;\n /** Source page that initiated the interaction */\n sourcePage: string;\n /** Application user identifier */\n appUser: string;\n /** Customer's contact number */\n customerNumber: string;\n /** Code indicating the reason for interaction */\n reasonCode: string;\n /** Path taken through the IVR system */\n IvrPath: string;\n /** Identifier for the IVR path */\n pathId: string;\n /** Email address or contact point that initiated the interaction */\n fromAddress: string;\n /** Identifier of the parent interaction for related interactions */\n parentInteractionId?: string;\n /** Identifier of the child interaction for related interactions */\n childInteractionId?: string;\n /** Type of relationship between parent and child interactions */\n relationshipType?: string;\n /** ANI of the parent interaction */\n parent_ANI?: string;\n /** DNIS of the parent interaction */\n parent_DNIS?: string;\n /** Indicates if the consulted destination agent has joined */\n consultDestinationAgentJoined?: boolean | string;\n /** Name of the destination agent for consultation */\n consultDestinationAgentName?: string;\n /** DN of the parent interaction's agent */\n parent_Agent_DN?: string;\n /** Name of the parent interaction's agent */\n parent_Agent_Name?: string;\n /** Team name of the parent interaction's agent */\n parent_Agent_TeamName?: string;\n /** Indicates if the interaction is in conference mode */\n isConferencing?: string;\n /** Type of monitoring being performed */\n monitorType?: string;\n /** Name of the workflow being executed */\n workflowName?: string;\n /** Identifier of the workflow */\n workflowId?: string;\n /** Indicates if monitoring is in invisible mode */\n monitoringInvisibleMode?: string;\n /** Identifier for the monitoring request */\n monitoringRequestId?: string;\n /** Timeout for participant invitation */\n participantInviteTimeout?: string;\n /** Filename for music on hold */\n mohFileName?: string;\n /** Flag for continuing recording during transfer */\n CONTINUE_RECORDING_ON_TRANSFER?: string;\n /** Entry point identifier */\n EP_ID?: string;\n /** Type of routing being used */\n ROUTING_TYPE?: string;\n /** Events registered with Flow Control Engine */\n fceRegisteredEvents?: string;\n /** Indicates if the interaction is parked */\n isParked?: string;\n /** Priority level of the interaction */\n priority?: string;\n /** Identifier for the routing strategy */\n routingStrategyId?: string;\n /** Current state of monitoring */\n monitoringState?: string;\n /** Indicates if blind transfer is in progress */\n BLIND_TRANSFER_IN_PROGRESS?: boolean;\n /** Desktop view configuration for Flow Control */\n fcDesktopView?: string;\n };\n /** Main interaction identifier for related interactions */\n mainInteractionId?: string;\n /** Media-specific information for the interaction */\n media: Record<\n string,\n {\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of media channel */\n mediaType: MEDIA_CHANNEL;\n /** Media manager handling this media */\n mediaMgr: string;\n /** List of participant identifiers */\n participants: string[];\n /** Type of media */\n mType: string;\n /** Indicates if media is on hold */\n isHold: boolean;\n /** Timestamp when media was put on hold */\n holdTimestamp: number | null;\n }\n >;\n /** Owner of the interaction */\n owner: string;\n /** Primary media channel for the interaction */\n mediaChannel: MEDIA_CHANNEL;\n /** Direction information for the contact */\n contactDirection: {type: string};\n /** Type of outbound interaction */\n outboundType?: string;\n /** Parameters passed through the call flow */\n callFlowParams: Record<\n string,\n {\n /** Name of the parameter */\n name: string;\n /** Qualifier for the parameter */\n qualifier: string;\n /** Description of the parameter */\n description: string;\n /** Data type of the parameter value */\n valueDataType: string;\n /** Value of the parameter */\n value: string;\n }\n >;\n};\n\n/**\n * Task payload containing detailed information about a contact center task\n * This structure encapsulates all relevant data for task management\n * @public\n */\nexport type TaskData = {\n /** Unique identifier for the media resource handling this task */\n mediaResourceId: string;\n /** Type of event that triggered this task data */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Identifier of the agent handling the task */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the task */\n trackingId: string;\n /** Media resource identifier for consultation operations */\n consultMediaResourceId: string;\n /** Detailed interaction information */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the task is from the owner */\n fromOwner?: boolean;\n /** Indicates if the task is to the owner */\n toOwner?: boolean;\n /** Identifier for child interaction in consult/transfer scenarios */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the task */\n owner: string;\n /** Queue manager handling the task */\n queueMgr: string;\n /** Name of the queue where task is queued */\n queueName?: string;\n /** Type of the task */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the task is in consultation state */\n isConsulted?: boolean;\n /** Indicates if the task is in conference state */\n isConferencing: boolean;\n /** 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 /** Indicates if wrap-up is required for this task */\n wrapUpRequired?: boolean;\n};\n\n/**\n * Type representing an agent contact message within the contact center system\n * Contains comprehensive interaction and task related details for agent operations\n * @public\n */\nexport type AgentContact = Msg<{\n /** Unique identifier for the media resource */\n mediaResourceId: string;\n /** Type of the event (e.g., 'AgentDesktopMessage') */\n eventType: string;\n /** Timestamp when the event occurred */\n eventTime?: number;\n /** Unique identifier of the agent handling the contact */\n agentId: string;\n /** Identifier of the destination agent for transfers/consults */\n destAgentId: string;\n /** Unique tracking identifier for the contact */\n trackingId: string;\n /** Media resource identifier for consult operations */\n consultMediaResourceId: string;\n /** Detailed interaction information including media and participant data */\n interaction: Interaction;\n /** Unique identifier for the participant */\n participantId?: string;\n /** Indicates if the message is from the owner of the interaction */\n fromOwner?: boolean;\n /** Indicates if the message is to the owner of the interaction */\n toOwner?: boolean;\n /** Identifier for child interaction in case of consult/transfer */\n childInteractionId?: string;\n /** Unique identifier for the interaction */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Current owner of the interaction */\n owner: string;\n /** Queue manager handling the interaction */\n queueMgr: string;\n /** Name of the queue where interaction is queued */\n queueName?: string;\n /** Type of the contact/interaction */\n type: string;\n /** Timeout value for RONA (Redirection on No Answer) in seconds */\n ronaTimeout?: number;\n /** Indicates if the interaction is in consult state */\n isConsulted?: boolean;\n /** Indicates if the interaction is in conference state */\n isConferencing: boolean;\n /** Identifier of the agent who last updated the interaction */\n updatedBy?: string;\n /** Type of destination for transfer/consult */\n destinationType?: string;\n /** Indicates if the interaction was automatically resumed */\n autoResumed?: boolean;\n /** Code indicating the reason for an action */\n reasonCode?: string | number;\n /** Description of the reason for an action */\n reason?: string;\n /** Identifier of the consulting agent */\n consultingAgentId?: string;\n /** Unique identifier for the task */\n taskId?: string;\n /** Task details including media and state information */\n task?: Interaction;\n /** Identifier of the supervisor monitoring the interaction */\n supervisorId?: string;\n /** Type of monitoring (e.g., 'SILENT', 'BARGE_IN') */\n monitorType?: string;\n /** Dial number of the supervisor */\n supervisorDN?: string;\n /** Unique identifier for monitoring offered events */\n id?: string;\n /** Indicates if the web call is muted */\n isWebCallMute?: boolean;\n /** Identifier for reservation interaction */\n reservationInteractionId?: string;\n /** Identifier for the reserved agent channel */\n reservedAgentChannelId?: string;\n /** Current monitoring state information */\n monitoringState?: {\n /** Type of monitoring state */\n type: string;\n };\n /** Name of the supervisor monitoring the interaction */\n supervisorName?: string;\n}>;\n\n/**\n * Information about a virtual team in the contact center\n * @ignore\n */\nexport type VTeam = {\n /** Profile ID of the agent in the virtual team */\n agentProfileId: string;\n /** Session ID of the agent in the virtual team */\n agentSessionId: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Type of the virtual team */\n type: string;\n /** Optional tracking identifier */\n trackingId?: string;\n};\n\n/**\n * Detailed information about a virtual team configuration\n * @ignore\n */\nexport type VteamDetails = {\n /** Name of the virtual team */\n name: string;\n /** Type of channel handled by the virtual team */\n channelType: string;\n /** Unique identifier for the virtual team */\n id: string;\n /** Type of the virtual team */\n type: string;\n /** ID of the analyzer associated with the team */\n analyzerId: string;\n};\n\n/**\n * Response type for successful virtual team operations\n * Contains details about virtual teams and their capabilities\n * @ignore\n */\nexport type VTeamSuccess = Msg<{\n /** Response data containing team information */\n data: {\n /** List of virtual team details */\n vteamList: Array<VteamDetails>;\n /** Whether queue consultation is allowed */\n allowConsultToQueue: boolean;\n };\n /** Method name from JavaScript */\n jsMethod: string;\n /** Data related to the call */\n callData: string;\n /** Session ID of the agent */\n agentSessionId: string;\n}>;\n\n/**\n * Parameters for putting a task on hold or resuming from hold\n * @public\n */\nexport type HoldResumePayload = {\n /** Unique identifier for the media resource to hold/resume */\n mediaResourceId: string;\n};\n\n/**\n * Parameters for resuming a task's recording\n * @public\n */\nexport type ResumeRecordingPayload = {\n /** Indicates if the recording was automatically resumed */\n autoResumed: boolean;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayLoad = {\n /** Destination identifier where the task will be transferred to */\n to: string;\n /** Type of the destination (queue, agent, etc.) */\n destinationType: DestinationType;\n};\n\n/**\n * Parameters for initiating a consultative transfer\n * @public\n */\nexport type ConsultTransferPayLoad = {\n /** Destination identifier for the consultation transfer */\n to: string;\n /** Type of the consultation transfer destination */\n destinationType: ConsultTransferDestinationType;\n};\n\n/**\n * Parameters for initiating a consultation with another agent or queue\n * @public\n */\nexport type ConsultPayload = {\n /** Destination identifier for the consultation */\n to: string | undefined;\n /** Type of the consultation destination (agent, queue, etc.) */\n destinationType: DestinationType;\n /** Whether to hold other participants during consultation (always true) */\n holdParticipants?: boolean;\n};\n\n/**\n * Parameters for ending a consultation task\n * @public\n */\nexport type ConsultEndPayload = {\n /** Indicates if this is a consultation operation */\n isConsult: boolean;\n /** Indicates if this involves a secondary entry point or DN agent */\n isSecondaryEpDnAgent?: boolean;\n /** Optional queue identifier for the consultation */\n queueId?: string;\n /** Identifier of the task being consulted */\n taskId: string;\n};\n\n/**\n * Parameters for transferring a task to another destination\n * @public\n */\nexport type TransferPayload = {\n /** Destination identifier where the task will be transferred */\n to: string | undefined;\n /** Type of the transfer destination */\n destinationType: DestinationType;\n};\n\n/**\n * API payload for ending a consultation\n * This is the actual payload that is sent to the developer API\n * @public\n */\nexport type ConsultEndAPIPayload = {\n /** Optional identifier of the queue involved in the consultation */\n queueId?: string;\n};\n\n/**\n * Data required for consulting and conferencing operations\n * @public\n */\nexport type ConsultConferenceData = {\n /** Identifier of the agent initiating consult/conference */\n agentId?: string;\n /** Target destination for the consult/conference */\n to: string | undefined;\n /** Type of destination (e.g., 'agent', 'queue') */\n destinationType: string;\n};\n\n/**\n * Legacy consultation conference data type matching Agent Desktop\n * @public\n */\nexport type consultConferencePayloadData = {\n /** Identifier of the agent initiating consult/conference */\n agentId: string;\n /** Type of destination (e.g., 'agent', 'queue') */\n destinationType: string;\n /** Identifier of the destination agent */\n destAgentId: 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};\n\n/**\n * Data structure for cleaning up contact resources\n * @public\n */\nexport type ContactCleanupData = {\n /** Type of cleanup operation being performed */\n type: string;\n /** Organization identifier where cleanup is occurring */\n orgId: string;\n /** Identifier of the agent associated with the contacts */\n agentId: string;\n /** Detailed data about the cleanup operation */\n data: {\n /** Type of event that triggered the cleanup */\n eventType: string;\n /** Identifier of the interaction being cleaned up */\n interactionId: string;\n /** Organization identifier */\n orgId: string;\n /** Media manager handling the cleanup */\n mediaMgr: string;\n /** Tracking identifier for the cleanup operation */\n trackingId: string;\n /** Type of media being cleaned up */\n mediaType: string;\n /** Optional destination information */\n destination?: string;\n /** Whether this is a broadcast cleanup */\n broadcast: boolean;\n /** Type of cleanup being performed */\n type: string;\n };\n};\n\n/**\n * Response type for task public methods\n * Can be an {@link AgentContact} object containing updated task state,\n * an Error in case of failure, or void for operations that don't return data\n * @public\n */\nexport type TaskResponse = AgentContact | Error | void;\n\n/**\n * Interface for managing task-related operations in the contact center\n * Extends EventEmitter to support event-driven task updates\n */\nexport interface ITask extends EventEmitter {\n /**\n * Event data received in the Contact Center events.\n * Contains detailed task information including interaction details, media resources,\n * and participant data as defined in {@link TaskData}\n */\n data: TaskData;\n\n /**\n * Map associating tasks with their corresponding call identifiers.\n */\n webCallMap: Record<TaskId, CallId>;\n\n /**\n * Auto-wrapup timer for the task\n * This is used to automatically wrap up tasks after a specified duration\n * as defined in {@link AutoWrapup}\n */\n autoWrapup?: AutoWrapup;\n\n /**\n * cancels the auto-wrapup timer for the task\n * This method stops the auto-wrapup process if it is currently active\n * Note: This is supported only in single session mode. Not supported in multi-session mode.\n * @returns void\n */\n cancelAutoWrapupTimer(): void;\n\n /**\n * Deregisters all web call event listeners\n * Used when cleaning up task resources\n * @ignore\n */\n unregisterWebCallListeners(): void;\n\n /**\n * Updates the task data with new information\n * @param newData - Updated task data to apply, must conform to {@link TaskData} structure\n * @returns Updated task instance\n * @ignore\n */\n updateTaskData(newData: TaskData): ITask;\n\n /**\n * Answers or accepts an incoming task.\n * Once accepted, the task will be assigned to the agent and trigger a {@link TASK_EVENTS.TASK_ASSIGNED} event.\n * The response will contain updated agent contact information as defined in {@link AgentContact}.\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * 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 * task.decline();\n * ```\n */\n decline(): Promise<TaskResponse>;\n\n /**\n * Places the current task on hold\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * task.hold();\n * ```\n */\n hold(): Promise<TaskResponse>;\n\n /**\n * Resumes a task that was previously on hold\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * task.resume();\n * ```\n */\n resume(): Promise<TaskResponse>;\n\n /**\n * Ends/terminates the current task\n * @returns Promise<TaskResponse>\n * @example\n * ```typescript\n * 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 * 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 * 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 * task.resumeRecording({\n * autoResumed: false\n * });\n * ```\n */\n resumeRecording(resumeRecordingPayload: ResumeRecordingPayload): Promise<TaskResponse>;\n}\n"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9B;EACAE,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMC,iCAAiC,GAAAL,OAAA,CAAAK,iCAAA,GAAG;EAC/C;EACAF,KAAK,EAAE,OAAO;EACd;EACAC,UAAU,EAAE,YAAY;EACxB;EACAF,UAAU,EAAE,YAAY;EACxB;EACAD,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMK,aAAa,GAAAN,OAAA,CAAAM,aAAA,GAAG;EAC3B;EACAC,KAAK,EAAE,OAAO;EACd;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,MAAM,EAAE,QAAQ;EAChB;EACAC,GAAG,EAAE,KAAK;EACV;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAJA,IAKYC,WAAW,GAAAd,OAAA,CAAAc,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AA6YvB;AACA;AACA;AACA;AACA;AA6LA;AACA;AACA;AACA;AACA;AAsEA;AACA;AACA;AACA;AACA;AAmFA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AA+BA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA"}
|
package/dist/types/cc.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ import { WebexPlugin } from '@webex/webex-core';
|
|
|
9
9
|
import { SetStateResponse, IContactCenter, AgentLogin, AgentProfileUpdate, StationLoginResponse, StationLogoutResponse, BuddyAgentsResponse, BuddyAgents, UploadLogsResponse, UpdateDeviceTypeResponse } from './types';
|
|
10
10
|
import LoggerProxy from './logger-proxy';
|
|
11
11
|
import { StateChange, Logout } from './services/agent/types';
|
|
12
|
-
import { Profile
|
|
12
|
+
import { Profile } from './services/config/types';
|
|
13
13
|
import { TaskResponse } from './services/task/types';
|
|
14
|
+
import AddressBook from './services/AddressBook';
|
|
15
|
+
import type { EntryPointListResponse, EntryPointSearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from './types';
|
|
14
16
|
/**
|
|
15
17
|
* The main Contact Center plugin class that enables integration with Webex Contact Center.
|
|
16
18
|
*
|
|
@@ -185,6 +187,68 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
185
187
|
* @private
|
|
186
188
|
*/
|
|
187
189
|
private metricsManager;
|
|
190
|
+
/**
|
|
191
|
+
* API instance for managing Webex Contact Center entry points
|
|
192
|
+
* Provides functionality to fetch entry points with caching support
|
|
193
|
+
* @type {EntryPoint}
|
|
194
|
+
* @public
|
|
195
|
+
* @example
|
|
196
|
+
* ```typescript
|
|
197
|
+
* const cc = webex.cc;
|
|
198
|
+
* await cc.register();
|
|
199
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
200
|
+
*
|
|
201
|
+
* // Access EntryPointRecord
|
|
202
|
+
* const response = await cc.entryPoint.getEntryPoints({
|
|
203
|
+
* page: 0,
|
|
204
|
+
* pageSize: 50
|
|
205
|
+
* });
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
private entryPoint;
|
|
209
|
+
/**
|
|
210
|
+
* API instance for managing Webex Contact Center address book contacts
|
|
211
|
+
* Provides functionality to fetch address book entries with caching support
|
|
212
|
+
* @type {AddressBook}
|
|
213
|
+
* @public
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const cc = webex.cc;
|
|
217
|
+
* await cc.register();
|
|
218
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
219
|
+
*
|
|
220
|
+
* // Access AddressBook API
|
|
221
|
+
* const response = await cc.addressBook.getEntries({
|
|
222
|
+
* page: 0,
|
|
223
|
+
* pageSize: 25
|
|
224
|
+
* });
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
addressBook: AddressBook;
|
|
228
|
+
/**
|
|
229
|
+
* API instance for managing Webex Contact Center queues
|
|
230
|
+
* Provides functionality to fetch queues with caching support
|
|
231
|
+
* @type {Queue}
|
|
232
|
+
* @public
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* const cc = webex.cc;
|
|
236
|
+
* await cc.register();
|
|
237
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
238
|
+
*
|
|
239
|
+
* // Access Queue API
|
|
240
|
+
* const response = await cc.queue.getQueues({
|
|
241
|
+
* page: 0,
|
|
242
|
+
* pageSize: 50
|
|
243
|
+
* });
|
|
244
|
+
*
|
|
245
|
+
* // Filter queues by specific criteria
|
|
246
|
+
* const filteredQueues = await cc.queue.getQueues({
|
|
247
|
+
* filter: 'id=="queue-id-123"'
|
|
248
|
+
* });
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
private queue;
|
|
188
252
|
/**
|
|
189
253
|
* Logger utility for Contact Center plugin
|
|
190
254
|
* Provides consistent logging across the plugin
|
|
@@ -580,48 +644,6 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
580
644
|
* ```
|
|
581
645
|
*/
|
|
582
646
|
startOutdial(destination: string): Promise<TaskResponse>;
|
|
583
|
-
/**
|
|
584
|
-
* This is used for getting the list of queues to which a task can be consulted or transferred.
|
|
585
|
-
* @param {string} [search] - Optional search string to filter queues by name
|
|
586
|
-
* @param {string} [filter] - Optional OData filter expression (e.g., 'teamId eq "team123"')
|
|
587
|
-
* @param {number} [page=0] - Page number for paginated results, starting at 0
|
|
588
|
-
* @param {number} [pageSize=100] - Number of queues to return per page
|
|
589
|
-
* @returns Promise<ContactServiceQueue[]> Resolves with the list of queues
|
|
590
|
-
* @throws Error If the operation fails
|
|
591
|
-
* @public
|
|
592
|
-
* @example
|
|
593
|
-
* ```typescript
|
|
594
|
-
* const cc = webex.cc;
|
|
595
|
-
* await cc.register();
|
|
596
|
-
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
597
|
-
*
|
|
598
|
-
* // Basic usage - get all queues
|
|
599
|
-
* const allQueues = await cc.getQueues();
|
|
600
|
-
*
|
|
601
|
-
* // Search for specific queues
|
|
602
|
-
* const salesQueues = await cc.getQueues('sales'); // Search for 'sales' in queue names
|
|
603
|
-
*
|
|
604
|
-
* // Use filtering and pagination
|
|
605
|
-
* const filteredQueues = await cc.getQueues(
|
|
606
|
-
* '', // No search term
|
|
607
|
-
* 'teamId eq "team123"', // Filter by team
|
|
608
|
-
* 0, // First page
|
|
609
|
-
* 50 // 50 items per page
|
|
610
|
-
* );
|
|
611
|
-
*
|
|
612
|
-
* // Process queue results
|
|
613
|
-
* queues.forEach(queue => {
|
|
614
|
-
* console.log('Queue:', {
|
|
615
|
-
* id: queue.queueId,
|
|
616
|
-
* name: queue.queueName,
|
|
617
|
-
* channelType: queue.channelType,
|
|
618
|
-
* isActive: queue.isActive,
|
|
619
|
-
* description: queue.description
|
|
620
|
-
* });
|
|
621
|
-
* });
|
|
622
|
-
* ```
|
|
623
|
-
*/
|
|
624
|
-
getQueues(search?: string, filter?: string, page?: number, pageSize?: number): Promise<ContactServiceQueue[]>;
|
|
625
647
|
/**
|
|
626
648
|
* Uploads logs to help troubleshoot SDK issues.
|
|
627
649
|
*
|
|
@@ -673,4 +695,16 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
|
|
|
673
695
|
* @public
|
|
674
696
|
*/
|
|
675
697
|
updateAgentProfile(data: AgentProfileUpdate): Promise<UpdateDeviceTypeResponse>;
|
|
698
|
+
/**
|
|
699
|
+
* Returns paginated entry points for the organization.
|
|
700
|
+
* Thin wrapper around internal EntryPoint instance.
|
|
701
|
+
* @public
|
|
702
|
+
*/
|
|
703
|
+
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
704
|
+
/**
|
|
705
|
+
* Returns paginated contact service queues for the organization.
|
|
706
|
+
* Thin wrapper around internal Queue instance.
|
|
707
|
+
* @public
|
|
708
|
+
*/
|
|
709
|
+
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
|
676
710
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import ContactCenter from './cc';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @module ContactCenterModule
|
|
4
|
+
* /
|
|
5
|
+
|
|
6
|
+
// Core exports
|
|
3
7
|
/**
|
|
4
8
|
* ContactCenter is the main plugin class for Webex Contact Center integration
|
|
5
9
|
* @category Core
|
|
@@ -15,6 +19,9 @@ export { default as Task } from './services/task';
|
|
|
15
19
|
* @category Services
|
|
16
20
|
*/
|
|
17
21
|
export { default as routingAgent } from './services/agent';
|
|
22
|
+
export { default as AddressBook } from './services/AddressBook';
|
|
23
|
+
/** EntryPoint API types */
|
|
24
|
+
export type { EntryPointRecord, EntryPointListResponse, EntryPointSearchParams, AddressBookEntry, AddressBookEntriesResponse, AddressBookEntrySearchParams, ContactServiceQueuesResponse, ContactServiceQueueSearchParams, ContactServiceQueue, } from './types';
|
|
18
25
|
/**
|
|
19
26
|
* Task Events for Contact Center operations
|
|
20
27
|
* @enum {string}
|
|
@@ -122,8 +129,6 @@ BuddyAgentsSuccess, } from './services/agent/types';
|
|
|
122
129
|
export type {
|
|
123
130
|
/** Profile interface */
|
|
124
131
|
Profile,
|
|
125
|
-
/** Contact service queue interface */
|
|
126
|
-
ContactServiceQueue,
|
|
127
132
|
/** Response type from getUserUsingCI method */
|
|
128
133
|
AgentResponse,
|
|
129
134
|
/** Response from getDesktopProfileById */
|
|
@@ -50,6 +50,13 @@ type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
|
50
50
|
* @property {string} TASK_ACCEPT_CONSULT_SUCCESS - Event name for successful consult acceptance.
|
|
51
51
|
* @property {string} TASK_ACCEPT_CONSULT_FAILED - Event name for failed consult acceptance.
|
|
52
52
|
*
|
|
53
|
+
* @property {string} TASK_CONFERENCE_START_SUCCESS - Event name for successful conference start.
|
|
54
|
+
* @property {string} TASK_CONFERENCE_START_FAILED - Event name for failed conference start.
|
|
55
|
+
* @property {string} TASK_CONFERENCE_END_SUCCESS - Event name for successful conference end.
|
|
56
|
+
* @property {string} TASK_CONFERENCE_END_FAILED - Event name for failed conference end.
|
|
57
|
+
* @property {string} TASK_CONFERENCE_TRANSFER_SUCCESS - Event name for successful conference transfer.
|
|
58
|
+
* @property {string} TASK_CONFERENCE_TRANSFER_FAILED - Event name for failed conference transfer.
|
|
59
|
+
*
|
|
53
60
|
* @property {string} TASK_OUTDIAL_SUCCESS - Event name for successful outdial task.
|
|
54
61
|
* @property {string} TASK_OUTDIAL_FAILED - Event name for failed outdial task.
|
|
55
62
|
*
|
|
@@ -103,14 +110,27 @@ export declare const METRIC_EVENT_NAMES: {
|
|
|
103
110
|
readonly TASK_PAUSE_RECORDING_FAILED: "Task Pause Recording Failed";
|
|
104
111
|
readonly TASK_ACCEPT_CONSULT_SUCCESS: "Task Accept Consult Success";
|
|
105
112
|
readonly TASK_ACCEPT_CONSULT_FAILED: "Task Accept Consult Failed";
|
|
113
|
+
readonly TASK_CONFERENCE_START_SUCCESS: "Task Conference Start Success";
|
|
114
|
+
readonly TASK_CONFERENCE_START_FAILED: "Task Conference Start Failed";
|
|
115
|
+
readonly TASK_CONFERENCE_END_SUCCESS: "Task Conference End Success";
|
|
116
|
+
readonly TASK_CONFERENCE_END_FAILED: "Task Conference End Failed";
|
|
117
|
+
readonly TASK_CONFERENCE_TRANSFER_SUCCESS: "Task Conference Transfer Success";
|
|
118
|
+
readonly TASK_CONFERENCE_TRANSFER_FAILED: "Task Conference Transfer Failed";
|
|
106
119
|
readonly TASK_OUTDIAL_SUCCESS: "Task Outdial Success";
|
|
107
120
|
readonly TASK_OUTDIAL_FAILED: "Task Outdial Failed";
|
|
108
121
|
readonly UPLOAD_LOGS_SUCCESS: "Upload Logs Success";
|
|
109
122
|
readonly UPLOAD_LOGS_FAILED: "Upload Logs Failed";
|
|
110
123
|
readonly WEBSOCKET_DEREGISTER_SUCCESS: "Websocket Deregister Success";
|
|
111
124
|
readonly WEBSOCKET_DEREGISTER_FAIL: "Websocket Deregister Failed";
|
|
125
|
+
readonly WEBSOCKET_EVENT_RECEIVED: "Websocket Event Received";
|
|
112
126
|
readonly AGENT_DEVICE_TYPE_UPDATE_SUCCESS: "Agent Device Type Update Success";
|
|
113
127
|
readonly AGENT_DEVICE_TYPE_UPDATE_FAILED: "Agent Device Type Update Failed";
|
|
128
|
+
readonly ENTRYPOINT_FETCH_SUCCESS: "Entrypoint Fetch Success";
|
|
129
|
+
readonly ENTRYPOINT_FETCH_FAILED: "Entrypoint Fetch Failed";
|
|
130
|
+
readonly ADDRESSBOOK_FETCH_SUCCESS: "AddressBook Fetch Success";
|
|
131
|
+
readonly ADDRESSBOOK_FETCH_FAILED: "AddressBook Fetch Failed";
|
|
132
|
+
readonly QUEUE_FETCH_SUCCESS: "Queue Fetch Success";
|
|
133
|
+
readonly QUEUE_FETCH_FAILED: "Queue Fetch Failed";
|
|
114
134
|
};
|
|
115
135
|
/**
|
|
116
136
|
* Represents the possible metric event names used within the metrics system.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { AddressBookEntriesResponse, AddressBookEntrySearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AddressBook API class for managing Webex Contact Center address book entries.
|
|
5
|
+
* Provides functionality to fetch address book entries using the entry API.
|
|
6
|
+
*
|
|
7
|
+
* @class AddressBook
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get AddressBook API instance from ContactCenter
|
|
21
|
+
* const addressBookAPI = cc.addressBook;
|
|
22
|
+
*
|
|
23
|
+
* // Get entries from agent's default address book
|
|
24
|
+
* const entries = await addressBookAPI.getEntries();
|
|
25
|
+
*
|
|
26
|
+
* // Get entries from a specific address book with pagination
|
|
27
|
+
* const entries = await addressBookAPI.getEntries({
|
|
28
|
+
* addressBookId: 'addressBookId123',
|
|
29
|
+
* page: 0,
|
|
30
|
+
* pageSize: 50
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* // Search for specific entries
|
|
34
|
+
* const searchResults = await addressBook.getEntries({
|
|
35
|
+
* search: 'john',
|
|
36
|
+
* filter: 'name=="John Doe"'
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class AddressBook {
|
|
41
|
+
private webexRequest;
|
|
42
|
+
private webex;
|
|
43
|
+
private getAddressBookId;
|
|
44
|
+
private metricsManager;
|
|
45
|
+
private pageCache;
|
|
46
|
+
/**
|
|
47
|
+
* Creates an instance of AddressBook
|
|
48
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
49
|
+
* @param {() => string} getAddressBookId - Function to get the addressBookId from agent profile
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
constructor(webex: WebexSDK, getAddressBookId: () => string);
|
|
53
|
+
/**
|
|
54
|
+
* Fetches address book entries for a specific address book using the entry API
|
|
55
|
+
* @param {AddressBookEntrySearchParams} [params] - Search and pagination parameters including addressBookId
|
|
56
|
+
* @returns {Promise<AddressBookEntriesResponse>} Promise resolving to address book entries
|
|
57
|
+
* @throws {Error} If the API call fails
|
|
58
|
+
* @public
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* // Get entries from agent's default address book
|
|
62
|
+
* const response = await addressBookAPI.getEntries();
|
|
63
|
+
*
|
|
64
|
+
* // Get entries from a specific address book with pagination
|
|
65
|
+
* const response = await addressBookAPI.getEntries({
|
|
66
|
+
* addressBookId: 'addressBookId123',
|
|
67
|
+
* page: 0,
|
|
68
|
+
* pageSize: 25
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
getEntries(params?: AddressBookEntrySearchParams): Promise<AddressBookEntriesResponse>;
|
|
73
|
+
}
|
|
74
|
+
export default AddressBook;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { EntryPointListResponse, EntryPointSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* EntryPoint class for managing Webex Contact Center entry points.
|
|
5
|
+
* Provides functionality to fetch, search, and paginate through entry points.
|
|
6
|
+
*
|
|
7
|
+
* @class EntryPoint
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get EntryPoint API instance from ContactCenter
|
|
21
|
+
* const entryPointAPI = cc.entryPoint;
|
|
22
|
+
*
|
|
23
|
+
* // Get all entry points with pagination
|
|
24
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
25
|
+
* page: 0,
|
|
26
|
+
* pageSize: 50
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Search for specific entry points
|
|
30
|
+
* const searchResults = await entryPointAPI.searchEntryPoints({
|
|
31
|
+
* search: 'support',
|
|
32
|
+
* filter: 'type=="voice"'
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class EntryPoint {
|
|
37
|
+
private webexRequest;
|
|
38
|
+
private webex;
|
|
39
|
+
private metricsManager;
|
|
40
|
+
private pageCache;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an instance of EntryPoint
|
|
43
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
constructor(webex: WebexSDK);
|
|
47
|
+
/**
|
|
48
|
+
* Fetches entry points for the organization with pagination support
|
|
49
|
+
* @param {EntryPointSearchParams} [params] - Search and pagination parameters
|
|
50
|
+
* @returns {Promise<EntryPointListResponse>} Promise resolving to paginated entry points
|
|
51
|
+
* @throws {Error} If the API call fails
|
|
52
|
+
* @public
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Get first page of entry points
|
|
56
|
+
* const response = await entryPointAPI.getEntryPoints();
|
|
57
|
+
*
|
|
58
|
+
* // Get specific page with custom page size
|
|
59
|
+
* const response = await entryPointAPI.getEntryPoints({
|
|
60
|
+
* page: 2,
|
|
61
|
+
* pageSize: 25
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
getEntryPoints(params?: EntryPointSearchParams): Promise<EntryPointListResponse>;
|
|
66
|
+
}
|
|
67
|
+
export default EntryPoint;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { WebexSDK } from '../types';
|
|
2
|
+
import type { ContactServiceQueuesResponse, ContactServiceQueueSearchParams } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Queue API class for managing Webex Contact Center contact service queues.
|
|
5
|
+
* Provides functionality to fetch contact service queues using the queue API.
|
|
6
|
+
*
|
|
7
|
+
* @class Queue
|
|
8
|
+
* @public
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import Webex from 'webex';
|
|
12
|
+
*
|
|
13
|
+
* const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
|
|
14
|
+
* const cc = webex.cc;
|
|
15
|
+
*
|
|
16
|
+
* // Register and login first
|
|
17
|
+
* await cc.register();
|
|
18
|
+
* await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
|
|
19
|
+
*
|
|
20
|
+
* // Get Queue API instance from ContactCenter
|
|
21
|
+
* const queueAPI = cc.queue;
|
|
22
|
+
*
|
|
23
|
+
* // Get all queues
|
|
24
|
+
* const queues = await queueAPI.getQueues();
|
|
25
|
+
*
|
|
26
|
+
* // Get queues with pagination
|
|
27
|
+
* const queues = await queueAPI.getQueues({
|
|
28
|
+
* page: 0,
|
|
29
|
+
* pageSize: 50
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* // Search for specific queues
|
|
33
|
+
* const searchResults = await queueAPI.getQueues({
|
|
34
|
+
* search: 'support',
|
|
35
|
+
* filter: 'name=="Support Queue"'
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class Queue {
|
|
40
|
+
private webexRequest;
|
|
41
|
+
private webex;
|
|
42
|
+
private metricsManager;
|
|
43
|
+
private pageCache;
|
|
44
|
+
/**
|
|
45
|
+
* Creates an instance of Queue
|
|
46
|
+
* @param {WebexSDK} webex - The Webex SDK instance
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
constructor(webex: WebexSDK);
|
|
50
|
+
/**
|
|
51
|
+
* Fetches contact service queues for the organization
|
|
52
|
+
* @param {ContactServiceQueueSearchParams} [params] - Search and pagination parameters
|
|
53
|
+
* @returns {Promise<ContactServiceQueuesResponse>} Promise resolving to contact service queues
|
|
54
|
+
* @throws {Error} If the API call fails
|
|
55
|
+
* @public
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Get all queues with default pagination
|
|
59
|
+
* const response = await queueAPI.getQueues();
|
|
60
|
+
*
|
|
61
|
+
* // Get queues with specific pagination
|
|
62
|
+
* const response = await queueAPI.getQueues({
|
|
63
|
+
* page: 0,
|
|
64
|
+
* pageSize: 25
|
|
65
|
+
* });
|
|
66
|
+
*
|
|
67
|
+
* // Search for queues
|
|
68
|
+
* const response = await queueAPI.getQueues({
|
|
69
|
+
* search: 'support',
|
|
70
|
+
* filter: 'queueType=="INBOUND"'
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getQueues(params?: ContactServiceQueueSearchParams): Promise<ContactServiceQueuesResponse>;
|
|
75
|
+
}
|
|
76
|
+
export default Queue;
|