ahs-cti 1.0.1-beta.2 → 1.0.1-beta.21
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/agentDetailReport-XUNWPSQW.mjs +10 -0
- package/dist/agentDetailReport-XUNWPSQW.mjs.map +1 -0
- package/dist/agentPerformanceReport-4WNLHIFT.mjs +597 -0
- package/dist/agentPerformanceReport-4WNLHIFT.mjs.map +1 -0
- package/dist/{callHistory-A5CBDPZR.mjs → callHistory-3CMW24B6.mjs} +27 -34
- package/dist/callHistory-3CMW24B6.mjs.map +1 -0
- package/dist/campaigns-FR7EIRXI.mjs +2664 -0
- package/dist/campaigns-FR7EIRXI.mjs.map +1 -0
- package/dist/cdrReport-6OBRKAYS.mjs +965 -0
- package/dist/cdrReport-6OBRKAYS.mjs.map +1 -0
- package/dist/chunk-AEDSLIHI.mjs +49 -0
- package/dist/chunk-AEDSLIHI.mjs.map +1 -0
- package/dist/chunk-FVNDPJUU.mjs +95 -0
- package/dist/chunk-FVNDPJUU.mjs.map +1 -0
- package/dist/chunk-I4CJTHZR.mjs +138 -0
- package/dist/chunk-I4CJTHZR.mjs.map +1 -0
- package/dist/chunk-RZZQ42MG.mjs +115 -0
- package/dist/chunk-RZZQ42MG.mjs.map +1 -0
- package/dist/chunk-U2DJ5WRK.mjs +1219 -0
- package/dist/chunk-U2DJ5WRK.mjs.map +1 -0
- package/dist/{chunk-FFYJ4LWU.mjs → chunk-YREOEULC.mjs} +127 -12
- package/dist/chunk-YREOEULC.mjs.map +1 -0
- package/dist/index.d.mts +630 -527
- package/dist/index.d.ts +631 -528
- package/dist/index.js +7409 -602
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +406 -512
- package/dist/index.mjs.map +1 -1
- package/dist/loginReport-MHNHB5F6.mjs +969 -0
- package/dist/loginReport-MHNHB5F6.mjs.map +1 -0
- package/package.json +16 -1
- package/dist/callHistory-A5CBDPZR.mjs.map +0 -1
- package/dist/chunk-FFYJ4LWU.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,411 +1,413 @@
|
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| "
|
|
44
|
-
| "
|
|
45
|
-
| "
|
|
46
|
-
| "
|
|
47
|
-
| "
|
|
48
|
-
| "
|
|
49
|
-
| "
|
|
50
|
-
| "
|
|
51
|
-
| "
|
|
52
|
-
| "
|
|
53
|
-
| "
|
|
54
|
-
| "
|
|
55
|
-
| "
|
|
56
|
-
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
* @param
|
|
125
|
-
* @param
|
|
126
|
-
* @param
|
|
127
|
-
* @param
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
*
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
*
|
|
269
|
-
* @param
|
|
270
|
-
* @param
|
|
271
|
-
* @param
|
|
272
|
-
* @param
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
*
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
* @
|
|
408
|
-
|
|
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
|
+
* Set holding state
|
|
293
|
+
* @param isHolding - Whether call is on hold
|
|
294
|
+
*/
|
|
295
|
+
public setHolding(isHolding: boolean): void;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Set muted state
|
|
299
|
+
* @param isMuted - Whether call is muted
|
|
300
|
+
*/
|
|
301
|
+
public setMuted(isMuted: boolean): void;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Set call status
|
|
305
|
+
* @param status - Current call status
|
|
306
|
+
*/
|
|
307
|
+
public setStatus(status: CallStatus): void;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Set process information
|
|
311
|
+
* @param process - Process data with ID and name
|
|
312
|
+
*/
|
|
313
|
+
public setProcess(process: { process_id: number; process_name: string }): void;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Set control panel position
|
|
317
|
+
* @param position - X and Y coordinates
|
|
318
|
+
*/
|
|
319
|
+
public setControlPanelPosition(position: { x: number; y: number }): void;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Set iframe position
|
|
323
|
+
* @param position - X and Y coordinates
|
|
324
|
+
*/
|
|
325
|
+
public setIframePosition(position: { x: number; y: number }): void;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Start a call (set start time and status)
|
|
329
|
+
*/
|
|
330
|
+
public startCall(): void;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* End a call (reset call state)
|
|
334
|
+
*/
|
|
335
|
+
public endCall(): void;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Set initialization check flag
|
|
339
|
+
*/
|
|
340
|
+
public setInitCheck(): void;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Set conference dialog open state
|
|
344
|
+
* @param open - Whether conference dialog is open
|
|
345
|
+
*/
|
|
346
|
+
public setOpenConferenceDialog(open: boolean): void;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Set call transfer dialog open state
|
|
350
|
+
* @param open - Whether call transfer dialog is open
|
|
351
|
+
*/
|
|
352
|
+
public setOpenCallTransferDialog(open: boolean): void;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Update call data
|
|
356
|
+
* @param data - Partial call data to update
|
|
357
|
+
*/
|
|
358
|
+
public updateCallData(data: Partial<CallData$1>): void;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Update conference data
|
|
362
|
+
* @param data - Array of conference line data
|
|
363
|
+
*/
|
|
364
|
+
public updateConferenceData(data: ConferenceLineTypes[]): void;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Set specific conference line
|
|
368
|
+
* @param line - Conference line data
|
|
369
|
+
*/
|
|
370
|
+
public setConferenceLine(line: ConferenceLineTypes): void;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Reset conference lines to initial state
|
|
374
|
+
*/
|
|
375
|
+
public resetConferenceLines(): void;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Clear storage and reset to initial state
|
|
379
|
+
*/
|
|
380
|
+
public clearStorageAndReset(): void;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Debug storage data
|
|
384
|
+
*/
|
|
385
|
+
public debugStorage(): void;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Get conference lines
|
|
389
|
+
* @returns Array of conference line data
|
|
390
|
+
*/
|
|
391
|
+
public getConferenceLines(): ConferenceLineTypes[];
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Set SDK permissions from user info
|
|
395
|
+
* @param userInfo - User info object from init response
|
|
396
|
+
*/
|
|
397
|
+
public setSDKPermissions(userInfo: any): void;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Get entitlement-based controls configuration
|
|
401
|
+
* @returns Controls configuration derived from permissions
|
|
402
|
+
*/
|
|
403
|
+
public getControlsConfig(): Partial<SDKConfig$1>;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @constant sdkStateManager
|
|
408
|
+
* @description Singleton instance of the SDK state manager
|
|
409
|
+
* @type {SDKStateManager}
|
|
410
|
+
*/
|
|
409
411
|
declare const sdkStateManager: SDKStateManager;
|
|
410
412
|
|
|
411
413
|
/**
|
|
@@ -583,12 +585,22 @@ declare const CallControlPanel: React.ComponentType<CallControlPanelProps>;
|
|
|
583
585
|
*
|
|
584
586
|
* @properties
|
|
585
587
|
* - `CallHistory` - Call History page component
|
|
588
|
+
* - `Campaigns` - Campaigns / Call Scheduling page component
|
|
589
|
+
* - `LoginReport` - Agent Login Report page component
|
|
590
|
+
* - `CdrReports` - CDR (Call Detail Records) Report page component
|
|
591
|
+
* - `AgentPerformanceReport` - Agent Performance Report page component
|
|
592
|
+
* - `AgentDetailReport` - Agent Detail Report page component
|
|
586
593
|
*
|
|
587
594
|
* @since 1.0.0
|
|
588
595
|
* @author CTI SDK Team
|
|
589
596
|
*/
|
|
590
597
|
declare const SDKPages: {
|
|
591
598
|
readonly CallHistory: React.ComponentType<any>;
|
|
599
|
+
readonly Campaigns: React.ComponentType<any>;
|
|
600
|
+
readonly LoginReport: React.ComponentType<any>;
|
|
601
|
+
readonly CdrReports: React.ComponentType<any>;
|
|
602
|
+
readonly AgentPerformanceReport: React.ComponentType<any>;
|
|
603
|
+
readonly AgentDetailReport: React.ComponentType<any>;
|
|
592
604
|
};
|
|
593
605
|
|
|
594
606
|
// =============================================================================
|
|
@@ -620,6 +632,8 @@ interface CallData {
|
|
|
620
632
|
phone_number?: string;
|
|
621
633
|
process_id?: string;
|
|
622
634
|
process_name?: string;
|
|
635
|
+
/** Raw socket/state call data — full unprocessed snapshot from the SDK state manager */
|
|
636
|
+
socket_info?: any;
|
|
623
637
|
}
|
|
624
638
|
|
|
625
639
|
/**
|
|
@@ -645,6 +659,7 @@ interface CallData {
|
|
|
645
659
|
*/
|
|
646
660
|
interface SDKConfig {
|
|
647
661
|
disableEndCallButton?: boolean;
|
|
662
|
+
disableEndConference?: boolean;
|
|
648
663
|
disabledDialButton?: boolean;
|
|
649
664
|
enableSmsServices?: boolean;
|
|
650
665
|
enableQueueName?: boolean;
|
|
@@ -665,7 +680,7 @@ interface URLConfig {
|
|
|
665
680
|
password: string;
|
|
666
681
|
webSocketURL: string;
|
|
667
682
|
coreBaseURL: string;
|
|
668
|
-
accessToken
|
|
683
|
+
accessToken?: string;
|
|
669
684
|
}
|
|
670
685
|
|
|
671
686
|
/**
|
|
@@ -708,126 +723,64 @@ interface CallControlPanelProps {
|
|
|
708
723
|
*/
|
|
709
724
|
|
|
710
725
|
/**
|
|
711
|
-
*
|
|
726
|
+
* End Call Payload Interface
|
|
712
727
|
*
|
|
713
728
|
* @interface EndCallPayload
|
|
714
|
-
* @description
|
|
715
|
-
*
|
|
729
|
+
* @description Defines the options for ending a call. All fields are optional —
|
|
730
|
+
* any omitted field falls back to the current session/call state automatically.
|
|
716
731
|
*
|
|
717
732
|
* @properties
|
|
718
|
-
* - `
|
|
719
|
-
* - `
|
|
720
|
-
* - `
|
|
721
|
-
* - `
|
|
722
|
-
* - `
|
|
723
|
-
* - `
|
|
724
|
-
* - `
|
|
725
|
-
* - `
|
|
726
|
-
* - `
|
|
727
|
-
* - `
|
|
733
|
+
* - `call_id?: string` - Convox call ID (defaults to active call's call_id)
|
|
734
|
+
* - `agent_id?: string` - Agent identifier (defaults to logged-in agent)
|
|
735
|
+
* - `set_followUp?: string` - Whether a follow-up is required: "Y" or "N" (default: "N")
|
|
736
|
+
* - `callback_date?: string` - Scheduled callback date (YYYY-MM-DD)
|
|
737
|
+
* - `callback_hrs?: number` - Scheduled callback hour (0–23)
|
|
738
|
+
* - `callback_mins?: number` - Scheduled callback minute (0–59)
|
|
739
|
+
* - `mobile_number?: string` - Customer phone number (defaults to active call's phone_number)
|
|
740
|
+
* - `list_comments?: string` - Optional comments for the call log
|
|
741
|
+
* - `call_reference_id?: string` - Call reference ID (defaults to active call's call_id)
|
|
742
|
+
* - `disposition?: string` - Call outcome code (default: "RES")
|
|
743
|
+
* - `line_number?: number` - Conference line number (default: 0)
|
|
744
|
+
* - `reason?: string` - End reason sent to server (default: "normal")
|
|
745
|
+
* - `is_mark_as_break?: boolean` - Whether agent is going on break after the call (sent in request body)
|
|
746
|
+
* - `patientLog?: any` - Optional patient/contact log data
|
|
728
747
|
*
|
|
729
748
|
* @example
|
|
730
749
|
* ```typescript
|
|
731
|
-
* //
|
|
732
|
-
*
|
|
733
|
-
* action: "ENDCALL",
|
|
734
|
-
* disposition: "RES",
|
|
735
|
-
* userId: "agent123",
|
|
736
|
-
* processid: "proc001",
|
|
737
|
-
* mobile_number: "1234567890",
|
|
738
|
-
* set_followUp: "N",
|
|
739
|
-
* callback_date: "",
|
|
740
|
-
* callback_hrs: "",
|
|
741
|
-
* callback_mins: ""
|
|
742
|
-
* };
|
|
750
|
+
* // Minimal — all defaults applied from session state
|
|
751
|
+
* await endCall();
|
|
743
752
|
*
|
|
744
|
-
* // With callback
|
|
745
|
-
*
|
|
746
|
-
* action: "ENDCALL",
|
|
753
|
+
* // With disposition and follow-up callback
|
|
754
|
+
* await endCall({
|
|
747
755
|
* disposition: "RES",
|
|
748
|
-
* userId: "agent123",
|
|
749
|
-
* processid: "proc001",
|
|
750
|
-
* mobile_number: "1234567890",
|
|
751
756
|
* set_followUp: "Y",
|
|
752
|
-
* callback_date: "
|
|
753
|
-
* callback_hrs:
|
|
754
|
-
* callback_mins:
|
|
755
|
-
* };
|
|
757
|
+
* callback_date: "2026-05-20",
|
|
758
|
+
* callback_hrs: 10,
|
|
759
|
+
* callback_mins: 30,
|
|
760
|
+
* });
|
|
761
|
+
*
|
|
762
|
+
* // Agent going on break after call
|
|
763
|
+
* await endCall({ disposition: "RES", is_mark_as_break: true });
|
|
756
764
|
* ```
|
|
757
765
|
*
|
|
758
766
|
* @since 1.0.0
|
|
759
767
|
* @author CTI SDK Team
|
|
760
768
|
*/
|
|
761
769
|
interface EndCallPayload {
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* 👤 Agent identifier
|
|
778
|
-
* @description Unique identifier for the agent ending the call
|
|
779
|
-
* @type {string}
|
|
780
|
-
*/
|
|
781
|
-
userId: string;
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
* ⚙️ Process identifier
|
|
785
|
-
* @description Unique identifier for the process
|
|
786
|
-
* @type {string}
|
|
787
|
-
*/
|
|
788
|
-
processid: string;
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* 📱 Customer phone number
|
|
792
|
-
* @description Phone number of the customer
|
|
793
|
-
* @type {string}
|
|
794
|
-
*/
|
|
795
|
-
mobile_number: string;
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* 📅 Follow-up requirement
|
|
799
|
-
* @description Whether a follow-up is required ("Y" or "N")
|
|
800
|
-
* @type {string}
|
|
801
|
-
*/
|
|
802
|
-
set_followUp: string;
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* 📅 Scheduled callback date
|
|
806
|
-
* @description Date for scheduled callback (YYYY-MM-DD format)
|
|
807
|
-
* @type {string}
|
|
808
|
-
*/
|
|
809
|
-
callback_date: string;
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* 🕐 Scheduled callback hour
|
|
813
|
-
* @description Hour for scheduled callback (0-23)
|
|
814
|
-
* @type {string}
|
|
815
|
-
*/
|
|
816
|
-
callback_hrs: string;
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* 🕐 Scheduled callback minute
|
|
820
|
-
* @description Minute for scheduled callback (0-59)
|
|
821
|
-
* @type {string}
|
|
822
|
-
*/
|
|
823
|
-
callback_mins: string;
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* 🔗 Optional call reference number
|
|
827
|
-
* @description Optional reference number for the call
|
|
828
|
-
* @type {string | undefined}
|
|
829
|
-
*/
|
|
830
|
-
refno?: string;
|
|
770
|
+
call_id?: string;
|
|
771
|
+
agent_id?: string;
|
|
772
|
+
set_followUp?: string;
|
|
773
|
+
callback_date?: string;
|
|
774
|
+
callback_hrs?: number;
|
|
775
|
+
callback_mins?: number;
|
|
776
|
+
mobile_number?: string;
|
|
777
|
+
list_comments?: string;
|
|
778
|
+
call_reference_id?: string;
|
|
779
|
+
is_mark_as_break?: boolean;
|
|
780
|
+
disposition?: string;
|
|
781
|
+
line_number?: number;
|
|
782
|
+
reason?: string;
|
|
783
|
+
patientLog?: any;
|
|
831
784
|
}
|
|
832
785
|
|
|
833
786
|
/**
|
|
@@ -1142,7 +1095,7 @@ interface ProcessData {
|
|
|
1142
1095
|
* Contains information about the current call
|
|
1143
1096
|
*
|
|
1144
1097
|
* @properties
|
|
1145
|
-
* - `
|
|
1098
|
+
* - `call_id: string` - 🔗 Call reference identifier
|
|
1146
1099
|
* - `phone_number: string` - 📱 Customer phone number
|
|
1147
1100
|
*
|
|
1148
1101
|
* @since 1.0.0
|
|
@@ -1154,7 +1107,7 @@ interface EndCallPayLoadData {
|
|
|
1154
1107
|
* @description Unique identifier for the call
|
|
1155
1108
|
* @type {string}
|
|
1156
1109
|
*/
|
|
1157
|
-
|
|
1110
|
+
call_id: string;
|
|
1158
1111
|
|
|
1159
1112
|
/**
|
|
1160
1113
|
* 📱 Customer phone number
|
|
@@ -1718,13 +1671,17 @@ interface StartCallPayload {
|
|
|
1718
1671
|
/** Optional auto-answer flag; defaults to false when omitted. */
|
|
1719
1672
|
auto_answer?: boolean;
|
|
1720
1673
|
/** Optional Convox call id passthrough. */
|
|
1721
|
-
|
|
1674
|
+
call_id?: string;
|
|
1722
1675
|
/** Optional caller-provided reference id. */
|
|
1723
1676
|
reference_id?: string;
|
|
1724
1677
|
/** Optional source identifier (e.g. campaign, dialpad). */
|
|
1725
1678
|
call_source?: string;
|
|
1726
1679
|
/** Optional case id passthrough. */
|
|
1727
1680
|
caseId?: string;
|
|
1681
|
+
/** Whether the call is being made during wrap-up. */
|
|
1682
|
+
isWrapup?: boolean;
|
|
1683
|
+
/** Convox call UUID of the parent call; used for wrap-up chaining. */
|
|
1684
|
+
parentCallUuid?: string;
|
|
1728
1685
|
}
|
|
1729
1686
|
|
|
1730
1687
|
interface ConferenceCallPayload {
|
|
@@ -2237,16 +2194,6 @@ interface ErrorResponse {
|
|
|
2237
2194
|
// ⚡ FRAMEWORK-AGNOSTIC ACTION EXPORTS (for Angular / non-React consumers)
|
|
2238
2195
|
// =============================================================================
|
|
2239
2196
|
|
|
2240
|
-
interface EndCallOptions {
|
|
2241
|
-
disposition?: string;
|
|
2242
|
-
followUp?: string;
|
|
2243
|
-
callbackDate?: string;
|
|
2244
|
-
callbackHrs?: string;
|
|
2245
|
-
callbackMins?: string;
|
|
2246
|
-
isBreak?: boolean;
|
|
2247
|
-
patientLog?: any;
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
2197
|
type SupervisorMonitorMode = "listen" | "whisper" | "barge";
|
|
2251
2198
|
|
|
2252
2199
|
interface StartMonitoringPayload {
|
|
@@ -2269,7 +2216,7 @@ interface ChangeModePayload {
|
|
|
2269
2216
|
|
|
2270
2217
|
declare function clickToCall(payload: StartCallPayload): Promise<any>;
|
|
2271
2218
|
declare function clickToConference(payload: ConferenceCallPayload): Promise<any>;
|
|
2272
|
-
declare function endCall(options?:
|
|
2219
|
+
declare function endCall(options?: EndCallPayload): Promise<any>;
|
|
2273
2220
|
declare function logout(): Promise<void>;
|
|
2274
2221
|
declare function startMonitoring(payload: StartMonitoringPayload): Promise<any>;
|
|
2275
2222
|
declare function stopMonitoring(payload: StopMonitoringPayload): Promise<any>;
|
|
@@ -2288,6 +2235,162 @@ interface UseClickToConferenceReturn {
|
|
|
2288
2235
|
data: any;
|
|
2289
2236
|
}
|
|
2290
2237
|
|
|
2291
|
-
declare function useClickToConference(): UseClickToConferenceReturn;
|
|
2238
|
+
declare function useClickToConference(): UseClickToConferenceReturn;
|
|
2239
|
+
|
|
2240
|
+
// =============================================================================
|
|
2241
|
+
// 📊 CALL MONITORING HOOK
|
|
2242
|
+
// =============================================================================
|
|
2243
|
+
|
|
2244
|
+
interface UseCallMonitoringReturn {
|
|
2245
|
+
startMonitoring: (payload: StartMonitoringPayload) => Promise<any>;
|
|
2246
|
+
stopMonitoring: (payload: StopMonitoringPayload) => Promise<any>;
|
|
2247
|
+
changeMode: (payload: ChangeModePayload) => Promise<any>;
|
|
2248
|
+
isLoading: boolean;
|
|
2249
|
+
isSuccess: boolean;
|
|
2250
|
+
isError: boolean;
|
|
2251
|
+
error: any;
|
|
2252
|
+
data: any;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
declare const useCallMonitoring: () => UseCallMonitoringReturn;
|
|
2256
|
+
|
|
2257
|
+
// =============================================================================
|
|
2258
|
+
// 🗃️ SDK STATE HOOK
|
|
2259
|
+
// =============================================================================
|
|
2260
|
+
|
|
2261
|
+
declare const useSDKState: () => any;
|
|
2262
|
+
|
|
2263
|
+
// =============================================================================
|
|
2264
|
+
// 🛡️ ENTITLEMENTS / PERMISSIONS
|
|
2265
|
+
// =============================================================================
|
|
2266
|
+
|
|
2267
|
+
/** "*" wildcard literal used in permission and menu codes. */
|
|
2268
|
+
declare const SDK_WILDCARD: "*";
|
|
2269
|
+
|
|
2270
|
+
/** Menu entitlement codes (used by SDKPages and SDKPermissionGuard). */
|
|
2271
|
+
declare const SDK_MENU_CODES: {
|
|
2272
|
+
readonly WILDCARD: "*";
|
|
2273
|
+
readonly CALL_HISTORY: "call_history";
|
|
2274
|
+
readonly CAMPAIGNS: "dialer_auto";
|
|
2275
|
+
readonly LOGIN_REPORT: "login_report";
|
|
2276
|
+
readonly CDR_REPORT: "cdr_report";
|
|
2277
|
+
readonly AGENT_PERFORMANCE_REPORT: "agent_performance";
|
|
2278
|
+
readonly AGENT_DETAIL_REPORT: "agent_detail";
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2281
|
+
/** SDK permission codes — feature-level entitlements. */
|
|
2282
|
+
declare const SDK_PERMISSIONS: {
|
|
2283
|
+
readonly WILDCARD: "*";
|
|
2284
|
+
readonly CALLS: "calls";
|
|
2285
|
+
readonly CALL_TRANSFER: "call_transfer";
|
|
2286
|
+
readonly CALL_CONFERENCE: "call_conference";
|
|
2287
|
+
readonly CALL_INBOUND: "call_inbound";
|
|
2288
|
+
readonly CALL_OUTBOUND: "call_outbound";
|
|
2289
|
+
readonly CONFERENCE: "call_conference";
|
|
2290
|
+
readonly TRANSFER_BLIND: "call_transfer_blind";
|
|
2291
|
+
readonly TRANSFER_ATTENDED: "call_transfer_attended";
|
|
2292
|
+
readonly TRANSFER_WARM: "call_transfer_warm";
|
|
2293
|
+
readonly CAMPAIGNS_CREATE: "campaigns:create";
|
|
2294
|
+
readonly CAMPAIGNS_READ: "campaigns:read";
|
|
2295
|
+
readonly CAMPAIGNS_UPDATE: "campaigns:update";
|
|
2296
|
+
readonly CAMPAIGNS_DELETE: "campaigns:delete";
|
|
2297
|
+
readonly CAMPAIGNS_MANAGE: "campaigns:manage";
|
|
2298
|
+
readonly CAMPAIGNS_CONTROL: "campaigns:control";
|
|
2299
|
+
readonly REPORTS_AGENT_LOGIN_READ: "reports:agent_login:read";
|
|
2300
|
+
readonly REPORTS_AGENT_LOGIN_EXPORT: "reports:agent_login:export";
|
|
2301
|
+
readonly REPORTS_AGENT_LOGIN_MANAGE: "reports:agent_login:manage";
|
|
2302
|
+
readonly REPORTS_CDR_READ: "reports:cdr:read";
|
|
2303
|
+
readonly REPORTS_CDR_EXPORT: "reports:cdr:export";
|
|
2304
|
+
readonly REPORTS_CDR_MANAGE: "reports:cdr:manage";
|
|
2305
|
+
};
|
|
2306
|
+
|
|
2307
|
+
// ─── Entitlement types ────────────────────────────────────────────────────────
|
|
2308
|
+
|
|
2309
|
+
interface SDKBit {
|
|
2310
|
+
code: string;
|
|
2311
|
+
enabled: boolean;
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
interface SDKEntitlement {
|
|
2315
|
+
enabled: boolean;
|
|
2316
|
+
items: SDKBit[];
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
interface SDKEntitlements {
|
|
2320
|
+
calls?: SDKEntitlement;
|
|
2321
|
+
call_controls?: SDKEntitlement;
|
|
2322
|
+
call_transfer?: SDKEntitlement;
|
|
2323
|
+
call_conference?: SDKEntitlement;
|
|
2324
|
+
[key: string]: any;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
interface SDKPermissionState {
|
|
2328
|
+
sdk: SDKEntitlements | null;
|
|
2329
|
+
isLoaded: boolean;
|
|
2330
|
+
error: Error | null;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
interface ControlsFromPermissions {
|
|
2334
|
+
disabledDialButton: boolean;
|
|
2335
|
+
disableEndCallButton: boolean;
|
|
2336
|
+
disableCallTransferButton: boolean;
|
|
2337
|
+
disableBlindTransfer: boolean;
|
|
2338
|
+
disableAttendedTransfer: boolean;
|
|
2339
|
+
disableWarmTransfer: boolean;
|
|
2340
|
+
disableConferenceButton: boolean;
|
|
2341
|
+
disableHoldButton: boolean;
|
|
2342
|
+
disableMuteButton: boolean;
|
|
2343
|
+
disabledMoreOptionsButton: boolean;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
interface SDKPermissionContextValue {
|
|
2347
|
+
state: SDKPermissionState;
|
|
2348
|
+
isBitEnabled: (category: keyof SDKEntitlements, bitCode: string) => boolean;
|
|
2349
|
+
getControlsConfig: () => ControlsFromPermissions;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
// ─── useSDKPermissions hook ───────────────────────────────────────────────────
|
|
2353
|
+
|
|
2354
|
+
interface SDKPermissionsHook {
|
|
2355
|
+
permissions: string[];
|
|
2356
|
+
menuEntitlements: Array<{ code: string; name: string; enabled: boolean }>;
|
|
2357
|
+
isLoaded: boolean;
|
|
2358
|
+
hasPermission: (permission: string) => boolean;
|
|
2359
|
+
hasAnyPermission: (permissions: string[]) => boolean;
|
|
2360
|
+
hasAllPermissions: (permissions: string[]) => boolean;
|
|
2361
|
+
hasMenuFeature: (code: string) => boolean;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
declare function useSDKPermissions(): SDKPermissionsHook;
|
|
2365
|
+
|
|
2366
|
+
// ─── Permission guard & access denied components ──────────────────────────────
|
|
2367
|
+
|
|
2368
|
+
interface SDKPermissionGuardProps {
|
|
2369
|
+
children?: React.ReactNode;
|
|
2370
|
+
/** Single permission code (e.g. "calls:inbound") */
|
|
2371
|
+
permission?: string;
|
|
2372
|
+
/** Multiple permission codes — ANY match grants access by default */
|
|
2373
|
+
permissions?: string[];
|
|
2374
|
+
/** When true, ALL permissions must be granted */
|
|
2375
|
+
requireAll?: boolean;
|
|
2376
|
+
/** One or more menu feature codes — ANY match grants access by default */
|
|
2377
|
+
menuFeature?: string | string[];
|
|
2378
|
+
/** When true, ALL menu features must be enabled */
|
|
2379
|
+
requireAllMenus?: boolean;
|
|
2380
|
+
/** Custom fallback rendered when access is denied */
|
|
2381
|
+
fallback?: React.ReactNode;
|
|
2382
|
+
/** Show the default Access Denied UI when denied. Defaults to true. */
|
|
2383
|
+
showFallback?: boolean;
|
|
2384
|
+
/** Callback fired when the guard denies access */
|
|
2385
|
+
onDenied?: () => void;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
declare const SDKPermissionGuard: React.FC<SDKPermissionGuardProps>;
|
|
2389
|
+
|
|
2390
|
+
interface SDKAccessDeniedProps {
|
|
2391
|
+
message?: string;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
declare const SDKAccessDenied: React.FC<SDKAccessDeniedProps>;
|
|
2292
2395
|
|
|
2293
|
-
export { type APIResponse, type AgentStatus, CallControlPanel, type CallControlPanelProps, type CallData, type CallInitiationFunction, type CallTerminationFunction, type ChangeModePayload, type CleanupOperation, type ConferenceCallPayload, type ConferenceLine, type
|
|
2396
|
+
export { type APIResponse, type AgentStatus, CallControlPanel, type CallControlPanelProps, type CallData, type CallInitiationFunction, type CallTerminationFunction, type ChangeModePayload, type CleanupOperation, type ConferenceCallPayload, type ConferenceLine, type ControlsFromPermissions, type DispositionType, type EndCallData, type EndCallPayLoadData, type EndCallPayload, type ErrorResponse, type FollowUpType, type HookStateTypes, type InitSDKParams, type LogoutFunction, type LogoutHookStateTypes, type LogoutPayload, type ProcessData, SDKAccessDenied, type SDKAccessDeniedProps, type SDKBit, type SDKConfig, type SDKEntitlement, type SDKEntitlements, SDKPages, type SDKPermissionContextValue, SDKPermissionGuard, type SDKPermissionGuardProps, type SDKPermissionState, type SDKPermissionsHook, type SDKState, SDKStateManager, SDK_MENU_CODES, SDK_PERMISSIONS, SDK_WILDCARD, type StartCallPayload, type StartCalltData, type StartCalltHookStateTypes, type StartMonitoringPayload, type StopMonitoringPayload, type StorageType, type SupervisorMonitorMode, type URLConfig, type UseCallMonitoringReturn, type UseClickToCallReturn, type UseClickToConferenceReturn, type UseEndCallReturn, type UseLogoutReturn, changeMonitorMode, clickToCall, clickToConference, endCall, getSDKVersion, initSDK, isSDKInitialized, logout, sdkStateManager, startMonitoring, stopMonitoring, useCallMonitoring, useClickToCall, useClickToConference, useEndCall, useGetAuthorizationToken, useGetCallerData, useLogout, useSDKPermissions, useSDKState };
|