@webex/contact-center 3.11.0 → 3.12.0

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.
Files changed (119) hide show
  1. package/dist/cc.js +91 -27
  2. package/dist/cc.js.map +1 -1
  3. package/dist/constants.js +5 -1
  4. package/dist/constants.js.map +1 -1
  5. package/dist/index.js +7 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/metrics/behavioral-events.js +13 -0
  8. package/dist/metrics/behavioral-events.js.map +1 -1
  9. package/dist/metrics/constants.js +9 -1
  10. package/dist/metrics/constants.js.map +1 -1
  11. package/dist/services/ApiAiAssistant.js +173 -0
  12. package/dist/services/ApiAiAssistant.js.map +1 -0
  13. package/dist/services/agent/types.js.map +1 -1
  14. package/dist/services/config/Util.js +6 -2
  15. package/dist/services/config/Util.js.map +1 -1
  16. package/dist/services/config/constants.js +12 -0
  17. package/dist/services/config/constants.js.map +1 -1
  18. package/dist/services/config/index.js +41 -2
  19. package/dist/services/config/index.js.map +1 -1
  20. package/dist/services/config/types.js +19 -1
  21. package/dist/services/config/types.js.map +1 -1
  22. package/dist/services/constants.js +19 -1
  23. package/dist/services/constants.js.map +1 -1
  24. package/dist/services/core/Err.js.map +1 -1
  25. package/dist/services/core/Utils.js +28 -6
  26. package/dist/services/core/Utils.js.map +1 -1
  27. package/dist/services/core/aqm-reqs.js +92 -17
  28. package/dist/services/core/aqm-reqs.js.map +1 -1
  29. package/dist/services/core/websocket/WebSocketManager.js +13 -1
  30. package/dist/services/core/websocket/WebSocketManager.js.map +1 -1
  31. package/dist/services/task/TaskManager.js +96 -25
  32. package/dist/services/task/TaskManager.js.map +1 -1
  33. package/dist/services/task/TaskUtils.js +16 -3
  34. package/dist/services/task/TaskUtils.js.map +1 -1
  35. package/dist/services/task/constants.js +14 -1
  36. package/dist/services/task/constants.js.map +1 -1
  37. package/dist/services/task/dialer.js +51 -0
  38. package/dist/services/task/dialer.js.map +1 -1
  39. package/dist/services/task/types.js +15 -0
  40. package/dist/services/task/types.js.map +1 -1
  41. package/dist/types/cc.d.ts +800 -0
  42. package/dist/types/config.d.ts +66 -0
  43. package/dist/types/constants.d.ts +50 -0
  44. package/dist/types/index.d.ts +184 -0
  45. package/dist/types/logger-proxy.d.ts +71 -0
  46. package/dist/types/metrics/MetricsManager.d.ts +223 -0
  47. package/dist/types/metrics/behavioral-events.d.ts +29 -0
  48. package/dist/types/metrics/constants.d.ts +161 -0
  49. package/dist/types/services/AddressBook.d.ts +74 -0
  50. package/dist/types/services/ApiAiAssistant.d.ts +31 -0
  51. package/dist/types/services/EntryPoint.d.ts +67 -0
  52. package/dist/types/services/Queue.d.ts +76 -0
  53. package/dist/types/services/WebCallingService.d.ts +1 -0
  54. package/dist/types/services/agent/index.d.ts +46 -0
  55. package/dist/types/services/agent/types.d.ts +413 -0
  56. package/dist/types/services/config/Util.d.ts +20 -0
  57. package/dist/types/services/config/constants.d.ts +249 -0
  58. package/dist/types/services/config/index.d.ts +177 -0
  59. package/dist/types/services/config/types.d.ts +1207 -0
  60. package/dist/types/services/constants.d.ts +103 -0
  61. package/dist/types/services/core/Err.d.ts +121 -0
  62. package/dist/types/services/core/GlobalTypes.d.ts +58 -0
  63. package/dist/types/services/core/Utils.d.ts +101 -0
  64. package/dist/types/services/core/WebexRequest.d.ts +22 -0
  65. package/dist/types/services/core/aqm-reqs.d.ts +65 -0
  66. package/dist/types/services/core/constants.d.ts +99 -0
  67. package/dist/types/services/core/types.d.ts +47 -0
  68. package/dist/types/services/core/websocket/WebSocketManager.d.ts +34 -0
  69. package/dist/types/services/core/websocket/connection-service.d.ts +27 -0
  70. package/dist/types/services/core/websocket/keepalive.worker.d.ts +2 -0
  71. package/dist/types/services/core/websocket/types.d.ts +37 -0
  72. package/dist/types/services/index.d.ts +52 -0
  73. package/dist/types/services/task/AutoWrapup.d.ts +40 -0
  74. package/dist/types/services/task/TaskManager.d.ts +1 -0
  75. package/dist/types/services/task/TaskUtils.d.ts +92 -0
  76. package/dist/types/services/task/constants.d.ts +83 -0
  77. package/dist/types/services/task/contact.d.ts +69 -0
  78. package/dist/types/services/task/dialer.d.ts +43 -0
  79. package/dist/types/services/task/index.d.ts +650 -0
  80. package/dist/types/services/task/types.d.ts +1319 -0
  81. package/dist/types/types.d.ts +643 -0
  82. package/dist/types/utils/PageCache.d.ts +173 -0
  83. package/dist/types/webex-config.d.ts +53 -0
  84. package/dist/types/webex.d.ts +7 -0
  85. package/dist/types.js +14 -1
  86. package/dist/types.js.map +1 -1
  87. package/dist/webex.js +1 -1
  88. package/package.json +9 -9
  89. package/src/cc.ts +120 -29
  90. package/src/constants.ts +4 -0
  91. package/src/index.ts +1 -0
  92. package/src/metrics/behavioral-events.ts +14 -0
  93. package/src/metrics/constants.ts +11 -0
  94. package/src/services/ApiAiAssistant.ts +217 -0
  95. package/src/services/agent/types.ts +1 -1
  96. package/src/services/config/Util.ts +8 -0
  97. package/src/services/config/constants.ts +12 -0
  98. package/src/services/config/index.ts +45 -1
  99. package/src/services/config/types.ts +67 -0
  100. package/src/services/constants.ts +21 -0
  101. package/src/services/core/Err.ts +1 -0
  102. package/src/services/core/Utils.ts +32 -5
  103. package/src/services/core/aqm-reqs.ts +100 -22
  104. package/src/services/core/websocket/WebSocketManager.ts +12 -0
  105. package/src/services/task/TaskManager.ts +149 -28
  106. package/src/services/task/TaskUtils.ts +12 -0
  107. package/src/services/task/constants.ts +15 -0
  108. package/src/services/task/dialer.ts +56 -1
  109. package/src/services/task/types.ts +24 -0
  110. package/src/types.ts +40 -1
  111. package/test/unit/spec/cc.ts +92 -22
  112. package/test/unit/spec/services/ApiAiAssistant.ts +115 -0
  113. package/test/unit/spec/services/config/index.ts +56 -0
  114. package/test/unit/spec/services/core/Utils.ts +63 -1
  115. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +71 -1
  116. package/test/unit/spec/services/task/TaskManager.ts +1015 -165
  117. package/test/unit/spec/services/task/dialer.ts +198 -112
  118. package/umd/contact-center.min.js +2 -2
  119. package/umd/contact-center.min.js.map +1 -1
@@ -0,0 +1,37 @@
1
+ import { SubscribeRequest } from '../../../types';
2
+ import { WebSocketManager } from './WebSocketManager';
3
+ /**
4
+ * Options for initializing a connection service.
5
+ * @typedef ConnectionServiceOptions
6
+ * @property {WebSocketManager} webSocketManager - The WebSocket manager instance.
7
+ * @property {SubscribeRequest} subscribeRequest - The subscribe request payload.
8
+ * @ignore
9
+ */
10
+ export type ConnectionServiceOptions = {
11
+ webSocketManager: WebSocketManager;
12
+ subscribeRequest: SubscribeRequest;
13
+ };
14
+ /**
15
+ * Details about the state of a lost connection and recovery attempts.
16
+ * @typedef ConnectionLostDetails
17
+ * @property {boolean} isConnectionLost - Indicates if the connection is currently lost.
18
+ * @property {boolean} isRestoreFailed - Indicates if restoring the connection has failed.
19
+ * @property {boolean} isSocketReconnected - Indicates if the socket has been reconnected.
20
+ * @property {boolean} isKeepAlive - Indicates if the keep-alive mechanism is active.
21
+ * @ignore
22
+ */
23
+ export type ConnectionLostDetails = {
24
+ isConnectionLost: boolean;
25
+ isRestoreFailed: boolean;
26
+ isSocketReconnected: boolean;
27
+ isKeepAlive: boolean;
28
+ };
29
+ /**
30
+ * Properties for connection configuration.
31
+ * @typedef ConnectionProp
32
+ * @property {number} lostConnectionRecoveryTimeout - Timeout in milliseconds for lost connection recovery.
33
+ * @ignore
34
+ */
35
+ export type ConnectionProp = {
36
+ lostConnectionRecoveryTimeout: number;
37
+ };
@@ -0,0 +1,52 @@
1
+ import routingAgent from './agent';
2
+ import routingContact from './task/contact';
3
+ import AgentConfigService from './config';
4
+ import { WebSocketManager } from './core/websocket/WebSocketManager';
5
+ import { ConnectionService } from './core/websocket/connection-service';
6
+ import { WebexSDK, SubscribeRequest } from '../types';
7
+ import aqmDialer from './task/dialer';
8
+ /**
9
+ * Services class provides centralized access to all contact center plugin services
10
+ * using a singleton pattern to ensure a single instance throughout the application.
11
+ * @private
12
+ * @ignore
13
+ * @class
14
+ */
15
+ export default class Services {
16
+ /** Agent services for managing agent state and capabilities */
17
+ readonly agent: ReturnType<typeof routingAgent>;
18
+ /** Configuration services for agent settings */
19
+ readonly config: AgentConfigService;
20
+ /** Contact services for managing customer interactions */
21
+ readonly contact: ReturnType<typeof routingContact>;
22
+ /** Dialer services for outbound calling features */
23
+ readonly dialer: ReturnType<typeof aqmDialer>;
24
+ /** WebSocket manager for handling real-time communications */
25
+ readonly webSocketManager: WebSocketManager;
26
+ /** Connection service for managing websocket connections */
27
+ readonly connectionService: ConnectionService;
28
+ /** Singleton instance of the Services class */
29
+ private static instance;
30
+ /**
31
+ * Creates a new Services instance
32
+ * @param options - Configuration options
33
+ * @param options.webex - WebexSDK instance
34
+ * @param options.connectionConfig - Subscription configuration for websocket connection
35
+ */
36
+ constructor(options: {
37
+ webex: WebexSDK;
38
+ connectionConfig: SubscribeRequest;
39
+ });
40
+ /**
41
+ * Gets singleton instance of Services class
42
+ * Creates a new instance if one doesn't exist
43
+ * @param options - Configuration options
44
+ * @param options.webex - WebexSDK instance
45
+ * @param options.connectionConfig - Subscription configuration for websocket connection
46
+ * @returns The singleton Services instance
47
+ */
48
+ static getInstance(options: {
49
+ webex: WebexSDK;
50
+ connectionConfig: SubscribeRequest;
51
+ }): Services;
52
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * AutoWrapup class implements a timer for automatic wrap-up functionality.
3
+ * It handles timing the wrap-up period and executing a callback when the timer completes.
4
+ */
5
+ export default class AutoWrapup {
6
+ private timer;
7
+ private startTime;
8
+ private readonly interval;
9
+ allowCancelAutoWrapup: boolean;
10
+ /**
11
+ * Creates a new AutoWrapup timer
12
+ * @param interval - Time in milliseconds before auto wrap-up executes
13
+ * @param allowCancelAutoWrapup - Whether to allow canceling the auto wrap-up
14
+ */
15
+ constructor(interval: number, allowCancelAutoWrapup?: boolean);
16
+ /**
17
+ * Starts the auto wrap-up timer
18
+ * @param onComplete - Callback function to execute when timer completes
19
+ */
20
+ start(onComplete: () => void): void;
21
+ /**
22
+ * Clears the auto wrap-up timer if it's running
23
+ */
24
+ clear(): void;
25
+ /**
26
+ * Gets the remaining time in milliseconds
27
+ * @returns Time left in milliseconds
28
+ */
29
+ getTimeLeft(): number;
30
+ /**
31
+ * Checks if the timer is currently running
32
+ * @returns True if the timer is running, false otherwise
33
+ */
34
+ isRunning(): boolean;
35
+ /**
36
+ * Gets the remaining time in seconds (rounded)
37
+ * @returns Time left in seconds
38
+ */
39
+ getTimeLeftSeconds(): number;
40
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,92 @@
1
+ import { Interaction, ITask, TaskData } from './types';
2
+ /**
3
+ * Determines if the given agent is the primary agent (owner) of the task
4
+ * @param task - The task to check
5
+ * @param agentId - The agent ID to check for primary status
6
+ * @returns true if the agent is the primary agent, false otherwise
7
+ */
8
+ export declare const isPrimary: (task: ITask, agentId: string) => boolean;
9
+ /**
10
+ * Checks if the given agent is a participant in the main interaction (mainCall)
11
+ * @param task - The task to check
12
+ * @param agentId - The agent ID to check for participation
13
+ * @returns true if the agent is a participant in the main interaction, false otherwise
14
+ */
15
+ export declare const isParticipantInMainInteraction: (task: ITask, agentId: string) => boolean;
16
+ /**
17
+ * Checks if the given agent is not in the interaction or has left the interaction
18
+ * @param task - The task to check
19
+ * @param agentId - The agent ID to check
20
+ * @returns true if the agent is not in the interaction or has left, false otherwise
21
+ */
22
+ export declare const checkParticipantNotInInteraction: (task: ITask, agentId: string) => boolean;
23
+ /**
24
+ * Determines if a conference is currently in progress based on the number of active agent participants
25
+ * @param TaskData - The payLoad data to check for conference status
26
+ * @returns true if there are 2 or more active agent participants in the main call, false otherwise
27
+ */
28
+ export declare const getIsConferenceInProgress: (data: TaskData) => boolean;
29
+ /**
30
+ * Checks if the current agent is a secondary agent in a consultation scenario.
31
+ * Secondary agents are those who were consulted (not the original call owner).
32
+ * @param task - The task object containing interaction details
33
+ * @returns true if this is a secondary agent (consulted party), false otherwise
34
+ */
35
+ export declare const isSecondaryAgent: (interaction: Interaction) => boolean;
36
+ /**
37
+ * Checks if the current agent is a secondary EP-DN (Entry Point Dial Number) agent.
38
+ * This is specifically for telephony consultations to external numbers/entry points.
39
+ * @param task - The task object containing interaction details
40
+ * @returns true if this is a secondary EP-DN agent in telephony consultation, false otherwise
41
+ */
42
+ export declare const isSecondaryEpDnAgent: (interaction: Interaction) => boolean;
43
+ /**
44
+ * Checks if auto-answer is enabled for the agent participant
45
+ * @param interaction - The interaction object
46
+ * @param agentId - Current agent ID
47
+ * @returns true if auto-answer is enabled, false otherwise
48
+ */
49
+ export declare const isAutoAnswerEnabled: (interaction: Interaction, agentId: string) => boolean;
50
+ /**
51
+ * Checks if the interaction is a WebRTC call eligible for auto-answer
52
+ * @param interaction - The interaction object
53
+ * @param loginOption - The agent's login option (BROWSER, AGENT_DN, etc.)
54
+ * @param webRtcEnabled - Whether WebRTC is enabled for the agent
55
+ * @returns true if this is a WebRTC call, false otherwise
56
+ */
57
+ export declare const isWebRTCCall: (interaction: Interaction, loginOption: string, webRtcEnabled: boolean) => boolean;
58
+ /**
59
+ * Checks if the interaction is a digital outbound (Email/SMS)
60
+ * @param interaction - The interaction object
61
+ * @returns true if this is a digital outbound, false otherwise
62
+ */
63
+ export declare const isDigitalOutbound: (interaction: Interaction) => boolean;
64
+ /**
65
+ * Checks if the outdial was initiated by the current agent
66
+ * @param interaction - The interaction object
67
+ * @param agentId - Current agent ID
68
+ * @returns true if agent initiated the outdial, false otherwise
69
+ */
70
+ export declare const hasAgentInitiatedOutdial: (interaction: Interaction, agentId: string) => boolean;
71
+ /**
72
+ * Determines if a task should be auto-answered based on interaction data
73
+ * Auto-answer logic handles:
74
+ * 1. WebRTC calls with auto-answer enabled in agent profile
75
+ * 2. Agent-initiated WebRTC outdial calls
76
+ * 3. Agent-initiated digital outbound (Email/SMS) without previous transfers
77
+ *
78
+ * @param taskData - The task data
79
+ * @param agentId - Current agent ID
80
+ * @param loginOption - Agent's login option
81
+ * @param webRtcEnabled - Whether WebRTC is enabled for the agent
82
+ * @returns true if task should be auto-answered, false otherwise
83
+ */
84
+ export declare const shouldAutoAnswerTask: (taskData: TaskData, agentId: string, loginOption: string, webRtcEnabled: boolean) => boolean;
85
+ /**
86
+ * Checks if a task is a campaign preview reservation that has not yet been accepted.
87
+ * Campaign preview tasks should not trigger incoming call handling until the agent
88
+ * explicitly accepts the preview contact.
89
+ * @param task - The task to check
90
+ * @returns true if the task is a pending campaign preview reservation, false otherwise
91
+ */
92
+ export declare const isCampaignPreviewReservation: (task: ITask) => boolean;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Constants for Task Service
3
+ * @module @webex/contact-center/services/task/constants
4
+ * @ignore
5
+ */
6
+ export declare const TASK_MESSAGE_TYPE = "RoutingMessage";
7
+ export declare const TASK_API = "/v1/tasks/";
8
+ export declare const HOLD = "/hold";
9
+ export declare const UNHOLD = "/unhold";
10
+ export declare const CONSULT = "/consult";
11
+ export declare const CONSULT_ACCEPT = "/consult/accept";
12
+ export declare const CONSULT_END = "/consult/end";
13
+ export declare const TRANSFER = "/transfer";
14
+ export declare const CONSULT_TRANSFER = "/consult/transfer";
15
+ export declare const PAUSE = "/record/pause";
16
+ export declare const RESUME = "/record/resume";
17
+ export declare const WRAPUP = "/wrapup";
18
+ export declare const END = "/end";
19
+ export declare const CONSULT_CONFERENCE = "/consult/conference";
20
+ export declare const CONFERENCE_EXIT = "/conference/exit";
21
+ export declare const CONFERENCE_TRANSFER = "/conference/transfer";
22
+ export declare const DIALER_API = "/v1/dialer";
23
+ export declare const CAMPAIGN_PREVIEW_ACCEPT = "/accept";
24
+ /** 80-second timeout for accepting preview contact (outbound call setup takes longer than default 20s) */
25
+ export declare const TIMEOUT_PREVIEW_ACCEPT = 80000;
26
+ export declare const TASK_MANAGER_FILE = "taskManager";
27
+ export declare const TASK_FILE = "task";
28
+ /**
29
+ * Task data field names that should be preserved during reconciliation
30
+ * These fields are retained even if not present in new data during updates
31
+ */
32
+ export declare const PRESERVED_TASK_DATA_FIELDS: {
33
+ /** Indicates if the task is in consultation state */
34
+ IS_CONSULTED: string;
35
+ /** Indicates if wrap-up is required for this task */
36
+ WRAP_UP_REQUIRED: string;
37
+ /** Indicates if a conference is currently in progress (2+ active agents) */
38
+ IS_CONFERENCE_IN_PROGRESS: string;
39
+ /** Indicates if auto-answer is in progress for this task */
40
+ IS_AUTO_ANSWERING: string;
41
+ };
42
+ /**
43
+ * Array of task data field names that should not be deleted during reconciliation
44
+ * Used by reconcileData method to preserve important task state fields
45
+ */
46
+ export declare const KEYS_TO_NOT_DELETE: string[];
47
+ export declare const METHODS: {
48
+ ACCEPT: string;
49
+ TOGGLE_MUTE: string;
50
+ DECLINE: string;
51
+ HOLD: string;
52
+ RESUME: string;
53
+ END: string;
54
+ WRAPUP: string;
55
+ PAUSE_RECORDING: string;
56
+ RESUME_RECORDING: string;
57
+ CONSULT: string;
58
+ END_CONSULT: string;
59
+ TRANSFER: string;
60
+ CONSULT_TRANSFER: string;
61
+ CONSULT_CONFERENCE: string;
62
+ EXIT_CONFERENCE: string;
63
+ TRANSFER_CONFERENCE: string;
64
+ UPDATE_TASK_DATA: string;
65
+ RECONCILE_DATA: string;
66
+ HANDLE_INCOMING_WEB_CALL: string;
67
+ REGISTER_TASK_LISTENERS: string;
68
+ REMOVE_TASK_FROM_COLLECTION: string;
69
+ HANDLE_TASK_CLEANUP: string;
70
+ GET_TASK: string;
71
+ GET_ALL_TASKS: string;
72
+ GET_TASK_MANAGER: string;
73
+ SETUP_AUTO_WRAPUP_TIMER: string;
74
+ CANCEL_AUTO_WRAPUP_TIMER: string;
75
+ };
76
+ export declare const TRANSCRIPT_EVENT_MAP: {
77
+ AgentContactAssigned: string;
78
+ AgentConsulting: string;
79
+ AgentConsultConferenced: string;
80
+ AgentWrapup: string;
81
+ AgentConsultEnded: string;
82
+ ParticipantLeftConference: string;
83
+ };
@@ -0,0 +1,69 @@
1
+ import AqmReqs from '../core/aqm-reqs';
2
+ import * as Contact from './types';
3
+ export default function routingContact(aqm: AqmReqs): {
4
+ accept: import("../core/types").Res<Contact.AgentContact, {
5
+ interactionId: string;
6
+ }>;
7
+ hold: import("../core/types").Res<Contact.AgentContact, {
8
+ interactionId: string;
9
+ data: Contact.HoldResumePayload;
10
+ }>;
11
+ unHold: import("../core/types").Res<Contact.AgentContact, {
12
+ interactionId: string;
13
+ data: Contact.HoldResumePayload;
14
+ }>;
15
+ pauseRecording: import("../core/types").Res<Contact.AgentContact, {
16
+ interactionId: string;
17
+ }>;
18
+ resumeRecording: import("../core/types").Res<Contact.AgentContact, {
19
+ interactionId: string;
20
+ data: Contact.ResumeRecordingPayload;
21
+ }>;
22
+ consult: import("../core/types").Res<Contact.AgentContact, {
23
+ interactionId: string;
24
+ data: Contact.ConsultPayload;
25
+ }>;
26
+ consultEnd: import("../core/types").Res<Contact.AgentContact, {
27
+ interactionId: string;
28
+ data: Contact.ConsultEndPayload;
29
+ }>;
30
+ consultAccept: import("../core/types").Res<Contact.AgentContact, {
31
+ interactionId: string;
32
+ }>;
33
+ blindTransfer: import("../core/types").Res<Contact.AgentContact, {
34
+ interactionId: string;
35
+ data: Contact.TransferPayLoad;
36
+ }>;
37
+ vteamTransfer: import("../core/types").Res<Contact.AgentContact, {
38
+ interactionId: string;
39
+ data: Contact.TransferPayLoad;
40
+ }>;
41
+ consultTransfer: import("../core/types").Res<Contact.AgentContact, {
42
+ interactionId: string;
43
+ data: Contact.ConsultTransferPayLoad;
44
+ }>;
45
+ end: import("../core/types").Res<Contact.AgentContact, {
46
+ interactionId: string;
47
+ }>;
48
+ wrapup: import("../core/types").Res<Contact.AgentContact, {
49
+ interactionId: string;
50
+ data: Contact.WrapupPayLoad;
51
+ }>;
52
+ cancelTask: import("../core/types").Res<Contact.AgentContact, {
53
+ interactionId: string;
54
+ }>;
55
+ cancelCtq: import("../core/types").Res<Contact.AgentContact, {
56
+ interactionId: string;
57
+ data: Contact.cancelCtq;
58
+ }>;
59
+ consultConference: import("../core/types").Res<Contact.AgentContact, {
60
+ interactionId: string;
61
+ data: Contact.ConsultConferenceData;
62
+ }>;
63
+ exitConference: import("../core/types").Res<Contact.AgentContact, {
64
+ interactionId: string;
65
+ }>;
66
+ conferenceTransfer: import("../core/types").Res<Contact.AgentContact, {
67
+ interactionId: string;
68
+ }>;
69
+ };
@@ -0,0 +1,43 @@
1
+ import * as Contact from './types';
2
+ import AqmReqs from '../core/aqm-reqs';
3
+ /**
4
+ * Returns an object with AQM dialer functions used for outbound contact handling.
5
+ *
6
+ * @param {AqmReqs} aqm - An instance of AQM request handler.
7
+ * @returns {{
8
+ * startOutdial: (params: {data: Contact.DialerPayload}) => Promise<any>
9
+ * }} Object containing methods for outbound dialing.
10
+ * @ignore
11
+ */
12
+ export default function aqmDialer(aqm: AqmReqs): {
13
+ /**
14
+ * Initiates an outbound contact (outdial) request.
15
+ *
16
+ * @param {Object} p - Parameters object.
17
+ * @param {Contact.DialerPayload} p.data - Payload for the outbound call.
18
+ * @returns {Promise<any>} A promise that resolves or rejects based on the outbound call response.
19
+ *
20
+ * Emits:
21
+ * - `CC_EVENTS.AGENT_OFFER_CONTACT` on success
22
+ * - `CC_EVENTS.AGENT_OUTBOUND_FAILED` on failure
23
+ * @ignore
24
+ */
25
+ startOutdial: import("../core/types").Res<Contact.AgentContact, {
26
+ data: Contact.DialerPayload;
27
+ }>;
28
+ /**
29
+ * Accepts a campaign preview contact, initiating the outbound call.
30
+ *
31
+ * @param {Object} p - Parameters object.
32
+ * @param {Contact.PreviewContactPayload} p.data - Payload containing interactionId and campaignId.
33
+ * @returns {Promise<Contact.AgentContact>} A promise that resolves with agent contact on success.
34
+ *
35
+ * Emits:
36
+ * - `CC_EVENTS.AGENT_CONTACT_ASSIGNED` on success
37
+ * - `CC_EVENTS.CAMPAIGN_PREVIEW_ACCEPT_FAILED` on failure
38
+ * @ignore
39
+ */
40
+ acceptPreviewContact: import("../core/types").Res<Contact.AgentContact, {
41
+ data: Contact.PreviewContactPayload;
42
+ }>;
43
+ };