ahs-cti 0.0.2-beta.8 → 0.0.2
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/README.md +425 -294
- package/dist/agentDetailReport-XSBMOUMW.mjs +12 -0
- package/dist/agentDetailReport-XSBMOUMW.mjs.map +1 -0
- package/dist/agentPerformanceReport-UT6QZWYD.mjs +533 -0
- package/dist/agentPerformanceReport-UT6QZWYD.mjs.map +1 -0
- package/dist/auditReport-R67BYA4Z.mjs +15 -0
- package/dist/auditReport-R67BYA4Z.mjs.map +1 -0
- package/dist/callHistory-PHGY224F.mjs +805 -0
- package/dist/callHistory-PHGY224F.mjs.map +1 -0
- package/dist/campaigns-JSMYHHDF.mjs +3049 -0
- package/dist/campaigns-JSMYHHDF.mjs.map +1 -0
- package/dist/caroQualityAuditDashboard-7X44HRZL.mjs +66 -0
- package/dist/caroQualityAuditDashboard-7X44HRZL.mjs.map +1 -0
- package/dist/caroVoiceAI-OZAB7LK4.mjs +21 -0
- package/dist/caroVoiceAI-OZAB7LK4.mjs.map +1 -0
- package/dist/cdrReport-44LN5VUX.mjs +819 -0
- package/dist/cdrReport-44LN5VUX.mjs.map +1 -0
- package/dist/chunk-6ICPXSN6.mjs +61 -0
- package/dist/chunk-6ICPXSN6.mjs.map +1 -0
- package/dist/chunk-CXULBAK6.mjs +493 -0
- package/dist/chunk-CXULBAK6.mjs.map +1 -0
- package/dist/chunk-FVXHNBYV.mjs +82 -0
- package/dist/chunk-FVXHNBYV.mjs.map +1 -0
- package/dist/chunk-G6KDIN5W.mjs +749 -0
- package/dist/chunk-G6KDIN5W.mjs.map +1 -0
- package/dist/chunk-GGACEO3I.mjs +180 -0
- package/dist/chunk-GGACEO3I.mjs.map +1 -0
- package/dist/chunk-HBR2JS4C.mjs +95 -0
- package/dist/chunk-HBR2JS4C.mjs.map +1 -0
- package/dist/chunk-HRM6S6J2.mjs +61 -0
- package/dist/chunk-HRM6S6J2.mjs.map +1 -0
- package/dist/chunk-JOZ4YQMR.mjs +116 -0
- package/dist/chunk-JOZ4YQMR.mjs.map +1 -0
- package/dist/chunk-O2XGWZLT.mjs +1060 -0
- package/dist/chunk-O2XGWZLT.mjs.map +1 -0
- package/dist/chunk-RZZQ42MG.mjs +115 -0
- package/dist/chunk-RZZQ42MG.mjs.map +1 -0
- package/dist/chunk-UZF5Q3GR.mjs +678 -0
- package/dist/chunk-UZF5Q3GR.mjs.map +1 -0
- package/dist/chunk-VQCHBU2Q.mjs +27 -0
- package/dist/chunk-VQCHBU2Q.mjs.map +1 -0
- package/dist/chunk-WWWM33FY.mjs +57 -0
- package/dist/chunk-WWWM33FY.mjs.map +1 -0
- package/dist/index.d.mts +795 -112
- package/dist/index.d.ts +796 -112
- package/dist/index.js +13690 -2103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2335 -2250
- package/dist/index.mjs.map +1 -1
- package/dist/liveStatus-AHKS4XLW.mjs +1077 -0
- package/dist/liveStatus-AHKS4XLW.mjs.map +1 -0
- package/dist/loginReport-7GBMZP55.mjs +828 -0
- package/dist/loginReport-7GBMZP55.mjs.map +1 -0
- package/dist/managementDashboard-TYON77NW.mjs +529 -0
- package/dist/managementDashboard-TYON77NW.mjs.map +1 -0
- package/dist/qualityAuditDashboard-AGJH5VVN.mjs +66 -0
- package/dist/qualityAuditDashboard-AGJH5VVN.mjs.map +1 -0
- package/package.json +16 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,431 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview TypeScript Declaration File for SDK State Manager
|
|
5
|
+
* @description Type declarations for the SDK state management system.
|
|
6
|
+
* Provides type definitions for centralized state management in the Call Control SDK.
|
|
7
|
+
*
|
|
8
|
+
* @author CTI SDK Team
|
|
9
|
+
* @version 6.x.x
|
|
10
|
+
* @since 2024
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Inline type definitions to avoid Rollup DTS bundler resolution issues
|
|
15
|
+
* with relative imports from handwritten .d.ts files.
|
|
16
|
+
*/
|
|
17
|
+
type SDKConfig$1 = {
|
|
18
|
+
disableEndCallButton?: boolean;
|
|
19
|
+
disableEndConference?: boolean;
|
|
20
|
+
enableSmsServices?: boolean;
|
|
21
|
+
enableQueueName?: boolean;
|
|
22
|
+
enableRingtone?: boolean;
|
|
23
|
+
disabledMoreOptionsButton?: boolean;
|
|
24
|
+
disabledDialButton?: boolean;
|
|
25
|
+
disableCallTransferButton?: boolean;
|
|
26
|
+
disableBlindTransfer?: boolean;
|
|
27
|
+
disableAttendedTransfer?: boolean;
|
|
28
|
+
disableWarmTransfer?: boolean;
|
|
29
|
+
isDraggable?: boolean;
|
|
30
|
+
disableSoftPhone?: boolean;
|
|
31
|
+
disableConferenceButton?: boolean;
|
|
32
|
+
disableHoldButton?: boolean;
|
|
33
|
+
disableMuteButton?: boolean;
|
|
34
|
+
disabled?: any;
|
|
35
|
+
enabled?: any;
|
|
36
|
+
outlined?: any;
|
|
37
|
+
auto_wrapup_time?: number;
|
|
38
|
+
break_time?: number;
|
|
39
|
+
sdkPosition?: "horizontal" | "vertical";
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type CallStatus =
|
|
43
|
+
| "IDLE"
|
|
44
|
+
| "READY"
|
|
45
|
+
| "BREAK"
|
|
46
|
+
| "ONCALL"
|
|
47
|
+
| "WRAPUP"
|
|
48
|
+
| "RINGING"
|
|
49
|
+
| "DIALING"
|
|
50
|
+
| "MISSED"
|
|
51
|
+
| "HOLD"
|
|
52
|
+
| "UNHOLD"
|
|
53
|
+
| "MUTE"
|
|
54
|
+
| "UNMUTE"
|
|
55
|
+
| "DISCONNECTED"
|
|
56
|
+
| "CONFERENCE"
|
|
57
|
+
| string;
|
|
58
|
+
|
|
59
|
+
type CallData$1 = {
|
|
60
|
+
mode?: string;
|
|
61
|
+
queue_name?: string;
|
|
62
|
+
mobileNumber?: string;
|
|
63
|
+
callReferenceId?: string;
|
|
64
|
+
callId?: string;
|
|
65
|
+
type?: string;
|
|
66
|
+
status: string;
|
|
67
|
+
agent_id: number;
|
|
68
|
+
phone_number?: string;
|
|
69
|
+
event_time?: string;
|
|
70
|
+
call_id?: string;
|
|
71
|
+
process_id?: string;
|
|
72
|
+
process_name?: string;
|
|
73
|
+
mute?: number;
|
|
74
|
+
hold?: number;
|
|
75
|
+
auto_wrapup_time?: number | null;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
type ConferenceLineTypes = {
|
|
79
|
+
line: number;
|
|
80
|
+
status: string;
|
|
81
|
+
type: "external" | "internal" | "";
|
|
82
|
+
phone: string;
|
|
83
|
+
isMute: boolean;
|
|
84
|
+
isHold: boolean;
|
|
85
|
+
isCallStart: boolean;
|
|
86
|
+
isMergeCall: boolean;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
type SDKState$1 = {
|
|
90
|
+
authorization: any;
|
|
91
|
+
openConferenceDialog: boolean;
|
|
92
|
+
openCallTransferDialog: boolean;
|
|
93
|
+
process?: { process_id: number; process_name: string } | null;
|
|
94
|
+
agentId: string;
|
|
95
|
+
sessionId?: string;
|
|
96
|
+
sdkConfig: SDKConfig$1 | null;
|
|
97
|
+
urlConfig: any | null;
|
|
98
|
+
isInitialized: boolean;
|
|
99
|
+
call_id?: string;
|
|
100
|
+
process_id?: number;
|
|
101
|
+
callStartTime: number | null;
|
|
102
|
+
position?: { x: number; y: number };
|
|
103
|
+
controlPanelPosition: { x: number; y: number };
|
|
104
|
+
iframePosition: { x: number; y: number };
|
|
105
|
+
callData: CallData$1;
|
|
106
|
+
conferenceLine: ConferenceLineTypes[];
|
|
107
|
+
hold: number;
|
|
108
|
+
mute: number;
|
|
109
|
+
agentStatus: string;
|
|
110
|
+
sdk: any | null;
|
|
111
|
+
isPermissionsLoaded: boolean;
|
|
112
|
+
userPermissions: string[] | null;
|
|
113
|
+
menuEntitlements: Array<{ code: string; name: string; enabled: boolean }> | null;
|
|
114
|
+
consultInfo: any | null;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @interface SDKStateManager
|
|
119
|
+
* @description Interface for the SDK state manager class
|
|
120
|
+
*/
|
|
121
|
+
interface SDKStateManager {
|
|
122
|
+
/**
|
|
123
|
+
* Initialize the SDK with API key, tenant ID, agent ID, and optional configuration
|
|
124
|
+
* @param apiKey - API key for authentication
|
|
125
|
+
* @param tenantId - Tenant identifier
|
|
126
|
+
* @param agentId - Agent identifier
|
|
127
|
+
* @param urlConfig - Optional URL configuration
|
|
128
|
+
* @param res - Optional initialization response
|
|
129
|
+
* @param callControlConfig - Optional call control configuration
|
|
130
|
+
*/
|
|
131
|
+
initialize(apiKey: string, tenantId: string, agentId: string, urlConfig?: any, res?: any, callControlConfig?: SDKConfig$1): void;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get the current state
|
|
135
|
+
* @returns Current SDK state
|
|
136
|
+
*/
|
|
137
|
+
getState(): SDKState$1;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Subscribe to state changes
|
|
141
|
+
* @param listener - Callback function to be called on state changes
|
|
142
|
+
* @returns Unsubscribe function
|
|
143
|
+
*/
|
|
144
|
+
subscribe(listener: () => void): () => void;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Set holding state
|
|
148
|
+
* @param isHolding - Whether call is on hold
|
|
149
|
+
*/
|
|
150
|
+
setHolding(isHolding: boolean): void;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Set muted state
|
|
154
|
+
* @param isMuted - Whether call is muted
|
|
155
|
+
*/
|
|
156
|
+
setMuted(isMuted: boolean): void;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Set call status
|
|
160
|
+
* @param status - Current call status
|
|
161
|
+
*/
|
|
162
|
+
setStatus(status: CallStatus): void;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Set process information
|
|
166
|
+
* @param process - Process data with ID and name
|
|
167
|
+
*/
|
|
168
|
+
setProcess(process: { process_id: number; process_name: string }): void;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Set control panel position
|
|
172
|
+
* @param position - X and Y coordinates
|
|
173
|
+
*/
|
|
174
|
+
setControlPanelPosition(position: { x: number; y: number }): void;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Set iframe position
|
|
178
|
+
* @param position - X and Y coordinates
|
|
179
|
+
*/
|
|
180
|
+
setIframePosition(position: { x: number; y: number }): void;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Start a call (set start time and status)
|
|
184
|
+
*/
|
|
185
|
+
startCall(): void;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* End a call (reset call state)
|
|
189
|
+
*/
|
|
190
|
+
endCall(): void;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Set initialization check flag
|
|
194
|
+
*/
|
|
195
|
+
setInitCheck(): void;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Set conference dialog open state
|
|
199
|
+
* @param open - Whether conference dialog is open
|
|
200
|
+
*/
|
|
201
|
+
setOpenConferenceDialog(open: boolean): void;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Set call transfer dialog open state
|
|
205
|
+
* @param open - Whether call transfer dialog is open
|
|
206
|
+
*/
|
|
207
|
+
setOpenCallTransferDialog(open: boolean): void;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Update call data
|
|
211
|
+
* @param data - Partial call data to update
|
|
212
|
+
*/
|
|
213
|
+
updateCallData(data: Partial<CallData$1>): void;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Update conference data
|
|
217
|
+
* @param data - Array of conference line data
|
|
218
|
+
*/
|
|
219
|
+
updateConferenceData(data: ConferenceLineTypes[]): void;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Set specific conference line
|
|
223
|
+
* @param line - Conference line data
|
|
224
|
+
*/
|
|
225
|
+
setConferenceLine(line: ConferenceLineTypes): void;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Reset conference lines to initial state
|
|
229
|
+
*/
|
|
230
|
+
resetConferenceLines(): void;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Clear storage and reset to initial state
|
|
234
|
+
*/
|
|
235
|
+
clearStorageAndReset(): void;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Debug storage data
|
|
239
|
+
*/
|
|
240
|
+
debugStorage(): void;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Get conference lines
|
|
244
|
+
* @returns Array of conference line data
|
|
245
|
+
*/
|
|
246
|
+
getConferenceLines(): ConferenceLineTypes[];
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Set SDK permissions from user info
|
|
250
|
+
* @param userInfo - User info object from init response
|
|
251
|
+
*/
|
|
252
|
+
setSDKPermissions(userInfo: any): void;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Get entitlement-based controls configuration
|
|
256
|
+
* @returns Controls configuration derived from permissions
|
|
257
|
+
*/
|
|
258
|
+
getControlsConfig(): Partial<SDKConfig$1>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @class SDKStateManager
|
|
263
|
+
* @description Centralized state management class for the Call Control SDK.
|
|
264
|
+
* Handles state persistence, subscriptions, and provides methods for state updates.
|
|
265
|
+
*/
|
|
266
|
+
declare class SDKStateManager implements SDKStateManager {
|
|
267
|
+
/**
|
|
268
|
+
* Initialize the SDK with API key, tenant ID, agent ID, and optional configuration
|
|
269
|
+
* @param apiKey - API key for authentication
|
|
270
|
+
* @param tenantId - Tenant identifier
|
|
271
|
+
* @param agentId - Agent identifier
|
|
272
|
+
* @param urlConfig - Optional URL configuration
|
|
273
|
+
* @param res - Optional initialization response
|
|
274
|
+
* @param callControlConfig - Optional call control configuration
|
|
275
|
+
*/
|
|
276
|
+
public initialize(apiKey: string, tenantId: string, agentId: string, urlConfig?: any, res?: any, callControlConfig?: SDKConfig$1): void;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Get the current state
|
|
280
|
+
* @returns Current SDK state
|
|
281
|
+
*/
|
|
282
|
+
public getState(): SDKState$1;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Subscribe to state changes
|
|
286
|
+
* @param listener - Callback function to be called on state changes
|
|
287
|
+
* @returns Unsubscribe function
|
|
288
|
+
*/
|
|
289
|
+
public subscribe(listener: () => void): () => void;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Store lead data to be attached as lead_data in the transfer API payload.
|
|
293
|
+
* Call this whenever lead details change in the host application.
|
|
294
|
+
*/
|
|
295
|
+
public setTransferLeadData(data: any): void;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Get the currently stored lead data.
|
|
299
|
+
*/
|
|
300
|
+
public getTransferLeadData(): any;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Clear stored lead data (called automatically when call goes IDLE).
|
|
304
|
+
*/
|
|
305
|
+
public clearTransferLeadData(): void;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Set holding state
|
|
309
|
+
* @param isHolding - Whether call is on hold
|
|
310
|
+
*/
|
|
311
|
+
public setHolding(isHolding: boolean): void;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Set muted state
|
|
315
|
+
* @param isMuted - Whether call is muted
|
|
316
|
+
*/
|
|
317
|
+
public setMuted(isMuted: boolean): void;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Set call status
|
|
321
|
+
* @param status - Current call status
|
|
322
|
+
*/
|
|
323
|
+
public setStatus(status: CallStatus): void;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Set process information
|
|
327
|
+
* @param process - Process data with ID and name
|
|
328
|
+
*/
|
|
329
|
+
public setProcess(process: { process_id: number; process_name: string }): void;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Set control panel position
|
|
333
|
+
* @param position - X and Y coordinates
|
|
334
|
+
*/
|
|
335
|
+
public setControlPanelPosition(position: { x: number; y: number }): void;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Set iframe position
|
|
339
|
+
* @param position - X and Y coordinates
|
|
340
|
+
*/
|
|
341
|
+
public setIframePosition(position: { x: number; y: number }): void;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Start a call (set start time and status)
|
|
345
|
+
*/
|
|
346
|
+
public startCall(): void;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* End a call (reset call state)
|
|
350
|
+
*/
|
|
351
|
+
public endCall(): void;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Set initialization check flag
|
|
355
|
+
*/
|
|
356
|
+
public setInitCheck(): void;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Set conference dialog open state
|
|
360
|
+
* @param open - Whether conference dialog is open
|
|
361
|
+
*/
|
|
362
|
+
public setOpenConferenceDialog(open: boolean): void;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Set call transfer dialog open state
|
|
366
|
+
* @param open - Whether call transfer dialog is open
|
|
367
|
+
*/
|
|
368
|
+
public setOpenCallTransferDialog(open: boolean): void;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Update call data
|
|
372
|
+
* @param data - Partial call data to update
|
|
373
|
+
*/
|
|
374
|
+
public updateCallData(data: Partial<CallData$1>): void;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Update conference data
|
|
378
|
+
* @param data - Array of conference line data
|
|
379
|
+
*/
|
|
380
|
+
public updateConferenceData(data: ConferenceLineTypes[]): void;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Set specific conference line
|
|
384
|
+
* @param line - Conference line data
|
|
385
|
+
*/
|
|
386
|
+
public setConferenceLine(line: ConferenceLineTypes): void;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Reset conference lines to initial state
|
|
390
|
+
*/
|
|
391
|
+
public resetConferenceLines(): void;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Clear storage and reset to initial state
|
|
395
|
+
*/
|
|
396
|
+
public clearStorageAndReset(): void;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Debug storage data
|
|
400
|
+
*/
|
|
401
|
+
public debugStorage(): void;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Get conference lines
|
|
405
|
+
* @returns Array of conference line data
|
|
406
|
+
*/
|
|
407
|
+
public getConferenceLines(): ConferenceLineTypes[];
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Set SDK permissions from user info
|
|
411
|
+
* @param userInfo - User info object from init response
|
|
412
|
+
*/
|
|
413
|
+
public setSDKPermissions(userInfo: any): void;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Get entitlement-based controls configuration
|
|
417
|
+
* @returns Controls configuration derived from permissions
|
|
418
|
+
*/
|
|
419
|
+
public getControlsConfig(): Partial<SDKConfig$1>;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @constant sdkStateManager
|
|
424
|
+
* @description Singleton instance of the SDK state manager
|
|
425
|
+
* @type {SDKStateManager}
|
|
426
|
+
*/
|
|
427
|
+
declare const sdkStateManager: SDKStateManager;
|
|
428
|
+
|
|
3
429
|
/**
|
|
4
430
|
* @fileoverview 📦 TypeScript Declaration File for Call Control SDK
|
|
5
431
|
* @description Comprehensive CTI (Computer Telephony Integration) SDK for agent platform applications.
|
|
@@ -96,7 +522,15 @@ interface InitSDKParams {
|
|
|
96
522
|
* @since 1.0.0
|
|
97
523
|
* @author CTI SDK Team
|
|
98
524
|
*/
|
|
99
|
-
|
|
525
|
+
interface SDKInitResult {
|
|
526
|
+
accessToken: string;
|
|
527
|
+
expiration: string;
|
|
528
|
+
ticketId: string;
|
|
529
|
+
callControls: any;
|
|
530
|
+
userInfo: any;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare function initSDK(params: InitSDKParams): Promise<SDKInitResult>;
|
|
100
534
|
|
|
101
535
|
/**
|
|
102
536
|
* 📋 Get SDK Version
|
|
@@ -168,6 +602,45 @@ declare function isSDKInitialized(): boolean;
|
|
|
168
602
|
*/
|
|
169
603
|
declare const CallControlPanel: React.ComponentType<CallControlPanelProps>;
|
|
170
604
|
|
|
605
|
+
/**
|
|
606
|
+
* 📄 SDK Pages
|
|
607
|
+
*
|
|
608
|
+
* @description Pre-built pages provided by the SDK, automatically protected by permission guards.
|
|
609
|
+
*
|
|
610
|
+
* @properties
|
|
611
|
+
* - `CallHistory` - Call History page component
|
|
612
|
+
* - `Campaigns` - Campaigns / Call Scheduling page component
|
|
613
|
+
* - `LoginReport` - Agent Login Report page component
|
|
614
|
+
* - `CdrReports` - CDR (Call Detail Records) Report page component
|
|
615
|
+
* - `AuditReportPage` - Stand-alone (full-tab) audit report page component
|
|
616
|
+
* - `AgentPerformanceReport` - Agent Performance Report page component
|
|
617
|
+
* - `AgentDetailReport` - Agent Detail Report page component
|
|
618
|
+
* - `LiveStatus` - Supervisor Live Status / Wallboard page component
|
|
619
|
+
*
|
|
620
|
+
* @since 1.0.0
|
|
621
|
+
* @author CTI SDK Team
|
|
622
|
+
*/
|
|
623
|
+
|
|
624
|
+
interface LiveStatusPageProps {
|
|
625
|
+
/** When true, renders the TV/wallboard variant: shows the top bar with clock, hides monitor action buttons */
|
|
626
|
+
isTvDashboard?: boolean;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
declare const SDKPages: {
|
|
630
|
+
readonly CallHistory: React.ComponentType<any>;
|
|
631
|
+
readonly Campaigns: React.ComponentType<any>;
|
|
632
|
+
readonly LoginReport: React.ComponentType<any>;
|
|
633
|
+
readonly CdrReports: React.ComponentType<any>;
|
|
634
|
+
readonly AuditReportPage: React.ComponentType<{ callUuid?: string }>;
|
|
635
|
+
readonly AgentPerformanceReport: React.ComponentType<any>;
|
|
636
|
+
readonly AgentDetailReport: React.ComponentType<any>;
|
|
637
|
+
readonly LiveStatus: React.ComponentType<LiveStatusPageProps>;
|
|
638
|
+
readonly ManagementDashboard: React.ComponentType<any>;
|
|
639
|
+
readonly CaroVoiceAI: React.ComponentType<any>;
|
|
640
|
+
readonly QualityAuditDashboard: React.ComponentType<any>;
|
|
641
|
+
readonly CaroQualityAuditDashboard: React.ComponentType<any>;
|
|
642
|
+
};
|
|
643
|
+
|
|
171
644
|
// =============================================================================
|
|
172
645
|
// 🗃️ TYPE EXPORTS
|
|
173
646
|
// =============================================================================
|
|
@@ -191,12 +664,40 @@ declare const CallControlPanel: React.ComponentType<CallControlPanelProps>;
|
|
|
191
664
|
* @author CTI SDK Team
|
|
192
665
|
*/
|
|
193
666
|
interface CallData {
|
|
667
|
+
mode?: string;
|
|
668
|
+
queue_name?: string;
|
|
669
|
+
mobileNumber?: string;
|
|
194
670
|
callReferenceId?: string;
|
|
195
|
-
|
|
196
|
-
|
|
671
|
+
convoxId?: string;
|
|
672
|
+
type?: string;
|
|
673
|
+
status: string;
|
|
674
|
+
agent_id: number;
|
|
197
675
|
phone_number?: string;
|
|
676
|
+
event_time?: string;
|
|
677
|
+
call_id?: string;
|
|
198
678
|
process_id?: string;
|
|
199
679
|
process_name?: string;
|
|
680
|
+
mute?: number;
|
|
681
|
+
hold?: number;
|
|
682
|
+
auto_wrapup_time?: number | null;
|
|
683
|
+
call_details?: {
|
|
684
|
+
extension?: string;
|
|
685
|
+
call_type?: string;
|
|
686
|
+
caller_direction?: string;
|
|
687
|
+
agent_id?: number;
|
|
688
|
+
queue_name?: string;
|
|
689
|
+
did_number?: string;
|
|
690
|
+
call_uuid?: string;
|
|
691
|
+
[key: string]: any;
|
|
692
|
+
};
|
|
693
|
+
/** Lead data set by the host app; attached when available */
|
|
694
|
+
lead_data?: any;
|
|
695
|
+
/** Raw socket payload from the most recent WebSocket message */
|
|
696
|
+
socket_info?: any;
|
|
697
|
+
break_details?: {
|
|
698
|
+
type: string;
|
|
699
|
+
value: string;
|
|
700
|
+
} | null;
|
|
200
701
|
}
|
|
201
702
|
|
|
202
703
|
/**
|
|
@@ -222,6 +723,7 @@ interface CallData {
|
|
|
222
723
|
*/
|
|
223
724
|
interface SDKConfig {
|
|
224
725
|
disableEndCallButton?: boolean;
|
|
726
|
+
disableEndConference?: boolean;
|
|
225
727
|
disabledDialButton?: boolean;
|
|
226
728
|
enableSmsServices?: boolean;
|
|
227
729
|
enableQueueName?: boolean;
|
|
@@ -235,12 +737,14 @@ interface SDKConfig {
|
|
|
235
737
|
}
|
|
236
738
|
|
|
237
739
|
interface URLConfig {
|
|
238
|
-
id
|
|
740
|
+
id?: string;
|
|
239
741
|
baseURL: string;
|
|
240
742
|
iframeURL: string;
|
|
241
743
|
iframeAPIURL: string;
|
|
242
744
|
password: string;
|
|
243
745
|
webSocketURL: string;
|
|
746
|
+
coreBaseURL: string;
|
|
747
|
+
accessToken?: string;
|
|
244
748
|
}
|
|
245
749
|
|
|
246
750
|
/**
|
|
@@ -283,126 +787,64 @@ interface CallControlPanelProps {
|
|
|
283
787
|
*/
|
|
284
788
|
|
|
285
789
|
/**
|
|
286
|
-
*
|
|
790
|
+
* End Call Payload Interface
|
|
287
791
|
*
|
|
288
792
|
* @interface EndCallPayload
|
|
289
|
-
* @description
|
|
290
|
-
*
|
|
793
|
+
* @description Defines the options for ending a call. All fields are optional —
|
|
794
|
+
* any omitted field falls back to the current session/call state automatically.
|
|
291
795
|
*
|
|
292
796
|
* @properties
|
|
293
|
-
* - `
|
|
294
|
-
* - `
|
|
295
|
-
* - `
|
|
296
|
-
* - `
|
|
297
|
-
* - `
|
|
298
|
-
* - `
|
|
299
|
-
* - `
|
|
300
|
-
* - `
|
|
301
|
-
* - `
|
|
302
|
-
* - `
|
|
797
|
+
* - `call_id?: string` - Convox call ID (defaults to active call's call_id)
|
|
798
|
+
* - `agent_id?: string` - Agent identifier (defaults to logged-in agent)
|
|
799
|
+
* - `set_followUp?: string` - Whether a follow-up is required: "Y" or "N" (default: "N")
|
|
800
|
+
* - `callback_date?: string` - Scheduled callback date (YYYY-MM-DD)
|
|
801
|
+
* - `callback_hrs?: number` - Scheduled callback hour (0–23)
|
|
802
|
+
* - `callback_mins?: number` - Scheduled callback minute (0–59)
|
|
803
|
+
* - `mobile_number?: string` - Customer phone number (defaults to active call's phone_number)
|
|
804
|
+
* - `list_comments?: string` - Optional comments for the call log
|
|
805
|
+
* - `call_reference_id?: string` - Call reference ID (defaults to active call's call_id)
|
|
806
|
+
* - `disposition?: string` - Call outcome code (default: "RES")
|
|
807
|
+
* - `line_number?: number` - Conference line number (default: 0)
|
|
808
|
+
* - `reason?: string` - End reason sent to server (default: "normal")
|
|
809
|
+
* - `is_mark_as_break?: boolean` - Whether agent is going on break after the call (sent in request body)
|
|
810
|
+
* - `patientLog?: any` - Optional patient/contact log data
|
|
303
811
|
*
|
|
304
812
|
* @example
|
|
305
813
|
* ```typescript
|
|
306
|
-
* //
|
|
307
|
-
*
|
|
308
|
-
* action: "ENDCALL",
|
|
309
|
-
* disposition: "RES",
|
|
310
|
-
* userId: "agent123",
|
|
311
|
-
* processid: "proc001",
|
|
312
|
-
* mobile_number: "1234567890",
|
|
313
|
-
* set_followUp: "N",
|
|
314
|
-
* callback_date: "",
|
|
315
|
-
* callback_hrs: "",
|
|
316
|
-
* callback_mins: ""
|
|
317
|
-
* };
|
|
814
|
+
* // Minimal — all defaults applied from session state
|
|
815
|
+
* await endCall();
|
|
318
816
|
*
|
|
319
|
-
* // With callback
|
|
320
|
-
*
|
|
321
|
-
* action: "ENDCALL",
|
|
817
|
+
* // With disposition and follow-up callback
|
|
818
|
+
* await endCall({
|
|
322
819
|
* disposition: "RES",
|
|
323
|
-
* userId: "agent123",
|
|
324
|
-
* processid: "proc001",
|
|
325
|
-
* mobile_number: "1234567890",
|
|
326
820
|
* set_followUp: "Y",
|
|
327
|
-
* callback_date: "
|
|
328
|
-
* callback_hrs:
|
|
329
|
-
* callback_mins:
|
|
330
|
-
* };
|
|
821
|
+
* callback_date: "2026-05-20",
|
|
822
|
+
* callback_hrs: 10,
|
|
823
|
+
* callback_mins: 30,
|
|
824
|
+
* });
|
|
825
|
+
*
|
|
826
|
+
* // Agent going on break after call
|
|
827
|
+
* await endCall({ disposition: "RES", is_mark_as_break: true });
|
|
331
828
|
* ```
|
|
332
829
|
*
|
|
333
830
|
* @since 1.0.0
|
|
334
831
|
* @author CTI SDK Team
|
|
335
832
|
*/
|
|
336
833
|
interface EndCallPayload {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* 👤 Agent identifier
|
|
353
|
-
* @description Unique identifier for the agent ending the call
|
|
354
|
-
* @type {string}
|
|
355
|
-
*/
|
|
356
|
-
userId: string;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* ⚙️ Process identifier
|
|
360
|
-
* @description Unique identifier for the process
|
|
361
|
-
* @type {string}
|
|
362
|
-
*/
|
|
363
|
-
processid: string;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* 📱 Customer phone number
|
|
367
|
-
* @description Phone number of the customer
|
|
368
|
-
* @type {string}
|
|
369
|
-
*/
|
|
370
|
-
mobile_number: string;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* 📅 Follow-up requirement
|
|
374
|
-
* @description Whether a follow-up is required ("Y" or "N")
|
|
375
|
-
* @type {string}
|
|
376
|
-
*/
|
|
377
|
-
set_followUp: string;
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* 📅 Scheduled callback date
|
|
381
|
-
* @description Date for scheduled callback (YYYY-MM-DD format)
|
|
382
|
-
* @type {string}
|
|
383
|
-
*/
|
|
384
|
-
callback_date: string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* 🕐 Scheduled callback hour
|
|
388
|
-
* @description Hour for scheduled callback (0-23)
|
|
389
|
-
* @type {string}
|
|
390
|
-
*/
|
|
391
|
-
callback_hrs: string;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* 🕐 Scheduled callback minute
|
|
395
|
-
* @description Minute for scheduled callback (0-59)
|
|
396
|
-
* @type {string}
|
|
397
|
-
*/
|
|
398
|
-
callback_mins: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* 🔗 Optional call reference number
|
|
402
|
-
* @description Optional reference number for the call
|
|
403
|
-
* @type {string | undefined}
|
|
404
|
-
*/
|
|
405
|
-
refno?: string;
|
|
834
|
+
call_id?: string;
|
|
835
|
+
agent_id?: string;
|
|
836
|
+
set_followUp?: string;
|
|
837
|
+
callback_date?: string;
|
|
838
|
+
callback_hrs?: number;
|
|
839
|
+
callback_mins?: number;
|
|
840
|
+
mobile_number?: string;
|
|
841
|
+
list_comments?: string;
|
|
842
|
+
call_reference_id?: string;
|
|
843
|
+
is_mark_as_break?: boolean;
|
|
844
|
+
disposition?: string;
|
|
845
|
+
line_number?: number;
|
|
846
|
+
reason?: string;
|
|
847
|
+
patientLog?: any;
|
|
406
848
|
}
|
|
407
849
|
|
|
408
850
|
/**
|
|
@@ -717,7 +1159,7 @@ interface ProcessData {
|
|
|
717
1159
|
* Contains information about the current call
|
|
718
1160
|
*
|
|
719
1161
|
* @properties
|
|
720
|
-
* - `
|
|
1162
|
+
* - `call_id: string` - 🔗 Call reference identifier
|
|
721
1163
|
* - `phone_number: string` - 📱 Customer phone number
|
|
722
1164
|
*
|
|
723
1165
|
* @since 1.0.0
|
|
@@ -729,7 +1171,7 @@ interface EndCallPayLoadData {
|
|
|
729
1171
|
* @description Unique identifier for the call
|
|
730
1172
|
* @type {string}
|
|
731
1173
|
*/
|
|
732
|
-
|
|
1174
|
+
call_id: string;
|
|
733
1175
|
|
|
734
1176
|
/**
|
|
735
1177
|
* 📱 Customer phone number
|
|
@@ -1288,6 +1730,27 @@ interface StartCallPayload {
|
|
|
1288
1730
|
* @type {string}
|
|
1289
1731
|
*/
|
|
1290
1732
|
mobileNumber: string;
|
|
1733
|
+
/** Optional user id; defaults to the logged-in agent id when omitted. */
|
|
1734
|
+
user?: string;
|
|
1735
|
+
/** Optional auto-answer flag; defaults to false when omitted. */
|
|
1736
|
+
auto_answer?: boolean;
|
|
1737
|
+
/** Optional Convox call id passthrough. */
|
|
1738
|
+
call_id?: string;
|
|
1739
|
+
/** Optional caller-provided reference id. */
|
|
1740
|
+
reference_id?: string;
|
|
1741
|
+
/** Optional source identifier (e.g. campaign, dialpad). */
|
|
1742
|
+
call_source?: string;
|
|
1743
|
+
/** Optional case id passthrough. */
|
|
1744
|
+
caseId?: string;
|
|
1745
|
+
/** Whether the call is being made during wrap-up. */
|
|
1746
|
+
isWrapup?: boolean;
|
|
1747
|
+
/** Convox call UUID of the parent call; used for wrap-up chaining. */
|
|
1748
|
+
parentCallUuid?: string;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
interface ConferenceCallPayload {
|
|
1752
|
+
mobileNumber: string;
|
|
1753
|
+
lineNumber?: number;
|
|
1291
1754
|
}
|
|
1292
1755
|
|
|
1293
1756
|
/**
|
|
@@ -1788,6 +2251,227 @@ interface ErrorResponse {
|
|
|
1788
2251
|
* @type {any}
|
|
1789
2252
|
*/
|
|
1790
2253
|
details?: any;
|
|
1791
|
-
}
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
// =============================================================================
|
|
2258
|
+
// ⚡ FRAMEWORK-AGNOSTIC ACTION EXPORTS (for Angular / non-React consumers)
|
|
2259
|
+
// =============================================================================
|
|
2260
|
+
|
|
2261
|
+
type SupervisorMonitorMode = "listen" | "whisper" | "barge";
|
|
2262
|
+
|
|
2263
|
+
interface StartMonitoringPayload {
|
|
2264
|
+
call_id: string;
|
|
2265
|
+
mode: SupervisorMonitorMode;
|
|
2266
|
+
supervisor_extension?: string;
|
|
2267
|
+
agent_extension?: string;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
interface StopMonitoringPayload {
|
|
2271
|
+
call_uuid: string;
|
|
2272
|
+
session_id?: string;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
interface ChangeModePayload {
|
|
2276
|
+
call_uuid: string;
|
|
2277
|
+
mode: SupervisorMonitorMode;
|
|
2278
|
+
session_id?: string;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
declare function clickToCall(payload: StartCallPayload): Promise<any>;
|
|
2282
|
+
declare function clickToConference(payload: ConferenceCallPayload): Promise<any>;
|
|
2283
|
+
declare function endCall(options?: EndCallPayload): Promise<any>;
|
|
2284
|
+
declare function logout(): Promise<void>;
|
|
2285
|
+
declare function startMonitoring(payload: StartMonitoringPayload): Promise<any>;
|
|
2286
|
+
declare function stopMonitoring(payload: StopMonitoringPayload): Promise<any>;
|
|
2287
|
+
declare function changeMonitorMode(payload: ChangeModePayload): Promise<any>;
|
|
2288
|
+
declare function setTransferLeadData(data: any): void;
|
|
2289
|
+
|
|
2290
|
+
// =============================================================================
|
|
2291
|
+
// ⚛️ REACT HOOKS
|
|
2292
|
+
// =============================================================================
|
|
2293
|
+
|
|
2294
|
+
interface UseClickToConferenceReturn {
|
|
2295
|
+
handleStartConferenceCall: (payload: ConferenceCallPayload) => Promise<any>;
|
|
2296
|
+
isLoading: boolean;
|
|
2297
|
+
isSuccess: boolean;
|
|
2298
|
+
isError: boolean;
|
|
2299
|
+
error: any;
|
|
2300
|
+
data: any;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
declare function useClickToConference(): UseClickToConferenceReturn;
|
|
2304
|
+
|
|
2305
|
+
// =============================================================================
|
|
2306
|
+
// 📊 CALL MONITORING HOOK
|
|
2307
|
+
// =============================================================================
|
|
2308
|
+
|
|
2309
|
+
interface UseCallMonitoringReturn {
|
|
2310
|
+
startMonitoring: (payload: StartMonitoringPayload) => Promise<any>;
|
|
2311
|
+
stopMonitoring: (payload: StopMonitoringPayload) => Promise<any>;
|
|
2312
|
+
changeMode: (payload: ChangeModePayload) => Promise<any>;
|
|
2313
|
+
isLoading: boolean;
|
|
2314
|
+
isSuccess: boolean;
|
|
2315
|
+
isError: boolean;
|
|
2316
|
+
error: any;
|
|
2317
|
+
data: any;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
declare const useCallMonitoring: () => UseCallMonitoringReturn;
|
|
2321
|
+
|
|
2322
|
+
// =============================================================================
|
|
2323
|
+
// 🗃️ SDK STATE HOOK
|
|
2324
|
+
// =============================================================================
|
|
2325
|
+
|
|
2326
|
+
declare const useSDKState: () => any;
|
|
2327
|
+
|
|
2328
|
+
// =============================================================================
|
|
2329
|
+
// 🛡️ ENTITLEMENTS / PERMISSIONS
|
|
2330
|
+
// =============================================================================
|
|
2331
|
+
|
|
2332
|
+
/** "*" wildcard literal used in permission and menu codes. */
|
|
2333
|
+
declare const SDK_WILDCARD: "*";
|
|
2334
|
+
|
|
2335
|
+
/** Menu entitlement codes (used by SDKPages and SDKPermissionGuard). */
|
|
2336
|
+
declare const SDK_MENU_CODES: {
|
|
2337
|
+
readonly WILDCARD: "*";
|
|
2338
|
+
readonly CALL_HISTORY: "call_history";
|
|
2339
|
+
readonly CAMPAIGNS: "dialer_auto";
|
|
2340
|
+
readonly LOGIN_REPORT: "login_report";
|
|
2341
|
+
readonly CDR_REPORT: "cdr_report";
|
|
2342
|
+
readonly AGENT_PERFORMANCE_REPORT: "agent_performance";
|
|
2343
|
+
readonly AGENT_DETAIL_REPORT: "agent_detail";
|
|
2344
|
+
readonly LIVE_STATUS: "live_status";
|
|
2345
|
+
readonly MANAGEMENT_DASHBOARD: "management_dashboard";
|
|
2346
|
+
readonly CARO_VOICE_AI: "caro_voice_ai";
|
|
2347
|
+
readonly QUALITY_AUDIT_DASHBOARD: "management_dashboard";
|
|
2348
|
+
readonly CARO_QUALITY_AUDIT_DASHBOARD: "management_dashboard";
|
|
2349
|
+
};
|
|
2350
|
+
|
|
2351
|
+
/** SDK permission codes — feature-level entitlements. */
|
|
2352
|
+
declare const SDK_PERMISSIONS: {
|
|
2353
|
+
readonly WILDCARD: "*";
|
|
2354
|
+
readonly CALLS: "calls";
|
|
2355
|
+
readonly CALL_TRANSFER: "call_transfer";
|
|
2356
|
+
readonly CALL_CONFERENCE: "call_conference";
|
|
2357
|
+
readonly CALL_INBOUND: "call_inbound";
|
|
2358
|
+
readonly CALL_OUTBOUND: "call_outbound";
|
|
2359
|
+
readonly CONFERENCE: "call_conference";
|
|
2360
|
+
readonly TRANSFER_BLIND: "call_transfer_blind";
|
|
2361
|
+
readonly TRANSFER_ATTENDED: "call_transfer_attended";
|
|
2362
|
+
readonly TRANSFER_WARM: "call_transfer_warm";
|
|
2363
|
+
readonly CAMPAIGNS_CREATE: "campaigns:create";
|
|
2364
|
+
readonly CAMPAIGNS_READ: "campaigns:read";
|
|
2365
|
+
readonly CAMPAIGNS_UPDATE: "campaigns:update";
|
|
2366
|
+
readonly CAMPAIGNS_DELETE: "campaigns:delete";
|
|
2367
|
+
readonly CAMPAIGNS_MANAGE: "campaigns:manage";
|
|
2368
|
+
readonly CAMPAIGNS_CONTROL: "campaigns:control";
|
|
2369
|
+
readonly CAMPAIGNS_LEADS_CREATE: "leads:create";
|
|
2370
|
+
readonly CAMPAIGNS_LEADS_READ: "leads:read";
|
|
2371
|
+
readonly CAMPAIGNS_LEADS_DELETE: "leads:delete";
|
|
2372
|
+
readonly CAMPAIGNS_LEADS_IMPORT: "leads:import";
|
|
2373
|
+
readonly REPORTS_AGENT_LOGIN_READ: "reports:agent_login:read";
|
|
2374
|
+
readonly REPORTS_AGENT_LOGIN_EXPORT: "reports:agent_login:export";
|
|
2375
|
+
readonly REPORTS_AGENT_LOGIN_MANAGE: "reports:agent_login:manage";
|
|
2376
|
+
readonly REPORTS_CDR_READ: "reports:cdr:read";
|
|
2377
|
+
readonly REPORTS_CDR_EXPORT: "reports:cdr:export";
|
|
2378
|
+
readonly REPORTS_CDR_MANAGE: "reports:cdr:manage";
|
|
2379
|
+
readonly REPORTS_AGENT_PERFORMANCE_READ: "reports:agent_performance:read";
|
|
2380
|
+
readonly REPORTS_AGENT_PERFORMANCE_EXPORT: "reports:agent_performance:export";
|
|
2381
|
+
readonly REPORTS_AGENT_PERFORMANCE_MANAGE: "reports:agent_performance:manage";
|
|
2382
|
+
readonly SUPERVISOR_MONITOR_LISTEN: "supervisor:monitor:listen";
|
|
2383
|
+
readonly SUPERVISOR_MONITOR_WHISPER: "supervisor:monitor:whisper";
|
|
2384
|
+
readonly SUPERVISOR_MONITOR_BARGE: "supervisor:monitor:barge";
|
|
2385
|
+
};
|
|
2386
|
+
|
|
2387
|
+
// ─── Entitlement types ────────────────────────────────────────────────────────
|
|
2388
|
+
|
|
2389
|
+
interface SDKBit {
|
|
2390
|
+
code: string;
|
|
2391
|
+
enabled: boolean;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
interface SDKEntitlement {
|
|
2395
|
+
enabled: boolean;
|
|
2396
|
+
items: SDKBit[];
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
interface SDKEntitlements {
|
|
2400
|
+
calls?: SDKEntitlement;
|
|
2401
|
+
call_controls?: SDKEntitlement;
|
|
2402
|
+
call_transfer?: SDKEntitlement;
|
|
2403
|
+
call_conference?: SDKEntitlement;
|
|
2404
|
+
[key: string]: any;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
interface SDKPermissionState {
|
|
2408
|
+
sdk: SDKEntitlements | null;
|
|
2409
|
+
isLoaded: boolean;
|
|
2410
|
+
error: Error | null;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
interface ControlsFromPermissions {
|
|
2414
|
+
disabledDialButton: boolean;
|
|
2415
|
+
disableEndCallButton: boolean;
|
|
2416
|
+
disableCallTransferButton: boolean;
|
|
2417
|
+
disableBlindTransfer: boolean;
|
|
2418
|
+
disableAttendedTransfer: boolean;
|
|
2419
|
+
disableWarmTransfer: boolean;
|
|
2420
|
+
disableConferenceButton: boolean;
|
|
2421
|
+
disableHoldButton: boolean;
|
|
2422
|
+
disableMuteButton: boolean;
|
|
2423
|
+
disabledMoreOptionsButton: boolean;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
interface SDKPermissionContextValue {
|
|
2427
|
+
state: SDKPermissionState;
|
|
2428
|
+
isBitEnabled: (category: keyof SDKEntitlements, bitCode: string) => boolean;
|
|
2429
|
+
getControlsConfig: () => ControlsFromPermissions;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
// ─── useSDKPermissions hook ───────────────────────────────────────────────────
|
|
2433
|
+
|
|
2434
|
+
interface SDKPermissionsHook {
|
|
2435
|
+
permissions: string[];
|
|
2436
|
+
menuEntitlements: Array<{ code: string; name: string; enabled: boolean }>;
|
|
2437
|
+
isLoaded: boolean;
|
|
2438
|
+
hasPermission: (permission: string) => boolean;
|
|
2439
|
+
hasAnyPermission: (permissions: string[]) => boolean;
|
|
2440
|
+
hasAllPermissions: (permissions: string[]) => boolean;
|
|
2441
|
+
hasMenuFeature: (code: string) => boolean;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
declare function useSDKPermissions(): SDKPermissionsHook;
|
|
2445
|
+
|
|
2446
|
+
// ─── Permission guard & access denied components ──────────────────────────────
|
|
2447
|
+
|
|
2448
|
+
interface SDKPermissionGuardProps {
|
|
2449
|
+
children?: React.ReactNode;
|
|
2450
|
+
/** Single permission code (e.g. "calls:inbound") */
|
|
2451
|
+
permission?: string;
|
|
2452
|
+
/** Multiple permission codes — ANY match grants access by default */
|
|
2453
|
+
permissions?: string[];
|
|
2454
|
+
/** When true, ALL permissions must be granted */
|
|
2455
|
+
requireAll?: boolean;
|
|
2456
|
+
/** One or more menu feature codes — ANY match grants access by default */
|
|
2457
|
+
menuFeature?: string | string[];
|
|
2458
|
+
/** When true, ALL menu features must be enabled */
|
|
2459
|
+
requireAllMenus?: boolean;
|
|
2460
|
+
/** Custom fallback rendered when access is denied */
|
|
2461
|
+
fallback?: React.ReactNode;
|
|
2462
|
+
/** Show the default Access Denied UI when denied. Defaults to true. */
|
|
2463
|
+
showFallback?: boolean;
|
|
2464
|
+
/** Callback fired when the guard denies access */
|
|
2465
|
+
onDenied?: () => void;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
declare const SDKPermissionGuard: React.FC<SDKPermissionGuardProps>;
|
|
2469
|
+
|
|
2470
|
+
interface SDKAccessDeniedProps {
|
|
2471
|
+
message?: string;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
declare const SDKAccessDenied: React.FC<SDKAccessDeniedProps>;
|
|
1792
2475
|
|
|
1793
|
-
export {
|
|
2476
|
+
export type { APIResponse, AgentStatus, CallControlPanelProps, CallData, CallInitiationFunction, CallTerminationFunction, ChangeModePayload, CleanupOperation, ConferenceCallPayload, ConferenceLine, ControlsFromPermissions, DispositionType, EndCallData, EndCallPayLoadData, EndCallPayload, ErrorResponse, FollowUpType, HookStateTypes, InitSDKParams, LiveStatusPageProps, LogoutFunction, LogoutHookStateTypes, LogoutPayload, ProcessData, SDKAccessDeniedProps, SDKBit, SDKConfig, SDKEntitlement, SDKEntitlements, SDKInitResult, SDKPermissionContextValue, SDKPermissionGuardProps, SDKPermissionState, SDKPermissionsHook, SDKState, StartCallPayload, StartCalltData, StartCalltHookStateTypes, StartMonitoringPayload, StopMonitoringPayload, StorageType, SupervisorMonitorMode, URLConfig, UseCallMonitoringReturn, UseClickToCallReturn, UseClickToConferenceReturn, UseEndCallReturn, UseLogoutReturn }
|
|
2477
|
+
export { CallControlPanel, SDKAccessDenied, SDKPages, SDKPermissionGuard, SDKStateManager, SDK_MENU_CODES, SDK_PERMISSIONS, SDK_WILDCARD, changeMonitorMode, clickToCall, clickToConference, endCall, getSDKVersion, initSDK, isSDKInitialized, logout, sdkStateManager, setTransferLeadData, startMonitoring, stopMonitoring, useCallMonitoring, useClickToCall, useClickToConference, useEndCall, useGetAuthorizationToken, useGetCallerData, useLogout, useSDKPermissions, useSDKState };
|