@voicenter-team/events-sdk 0.0.119 → 0.0.120
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/voicenter-events-sdk.cjs.js +11 -11
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +236 -3
- package/dist/voicenter-events-sdk.es.js +279 -279
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +6 -6
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +6 -6
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -78,6 +78,26 @@ export declare type AllUsersStatusEvent = {
|
|
|
78
78
|
|
|
79
79
|
export declare type AllUsersStatusEventSDK = EventTypeData<EventsEnum.ALL_USERS_STATUS>
|
|
80
80
|
|
|
81
|
+
export declare type AllVoicebotsStatus = {
|
|
82
|
+
/**
|
|
83
|
+
* 0 - Connection was establishing successfully.
|
|
84
|
+
*/
|
|
85
|
+
errorCode?: number;
|
|
86
|
+
/**
|
|
87
|
+
* “Ok” - Connection was establishing successfully.
|
|
88
|
+
*/
|
|
89
|
+
errorDesc?: string;
|
|
90
|
+
voicebots: Array<Voicebot>;
|
|
91
|
+
/**
|
|
92
|
+
* Server time at the moment of the event
|
|
93
|
+
*/
|
|
94
|
+
servertime: number;
|
|
95
|
+
/**
|
|
96
|
+
* Difference in time between server and client
|
|
97
|
+
*/
|
|
98
|
+
servertimeoffset: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
81
101
|
declare class AuthClass {
|
|
82
102
|
private readonly eventsSdkClass;
|
|
83
103
|
constructor(eventsSdkClass: EventsSdkClass);
|
|
@@ -280,6 +300,7 @@ export declare interface EventDataMap {
|
|
|
280
300
|
[EventsEnum.ALL_EXTENSION_STATUS]: AllExtensionStatusEvent
|
|
281
301
|
[EventsEnum.ALL_DIALER_STATUS]: AllDialersStatusEvent
|
|
282
302
|
[EventsEnum.ALL_USERS_STATUS]: AllUsersStatusEvent
|
|
303
|
+
[EventsEnum.ALL_VOICEBOTS_STATUS]: AllVoicebotsStatus
|
|
283
304
|
[EventsEnum.QUEUE_EVENT]: QueueEvent
|
|
284
305
|
[EventsEnum.EXTENSION_EVENT]: ExtensionEvent
|
|
285
306
|
[EventsEnum.DIALER_EVENT]: DialerEvent
|
|
@@ -288,6 +309,11 @@ export declare interface EventDataMap {
|
|
|
288
309
|
[EventsEnum.KEEP_ALIVE_RESPONSE]: KeepAliveResponseEvent
|
|
289
310
|
[EventsEnum.ONLINE_STATUS_EVENT]: OnlineStatusEvent
|
|
290
311
|
[EventsEnum.EXTENSIONS_UPDATED]: ExtensionsUpdated
|
|
312
|
+
[EventsEnum.VOICEBOT_SUBSCRIBED_TO_CALL]: SubscribedToVoicebotCall
|
|
313
|
+
[EventsEnum.VOICEBOT_SUBSCRIBE_TO_CALL_FAILED]: SubscribeToVoicebotCallFailed
|
|
314
|
+
[EventsEnum.VOICEBOT_INITIAL_CALL_HISTORY]: InitialVoicebotCallHistory
|
|
315
|
+
[EventsEnum.VOICEBOT_UNSUBSCRIBED_FROM_CALL]: UnsubscribedFromVoicebotCall
|
|
316
|
+
[EventsEnum.VOICEBOT_EVENT]: VoicebotEvent
|
|
291
317
|
}
|
|
292
318
|
|
|
293
319
|
/**
|
|
@@ -328,6 +354,12 @@ export declare enum EventsEnum {
|
|
|
328
354
|
ONLINE_STATUS_EVENT = 'onlineStatusEvent',
|
|
329
355
|
DIALER_EVENT = 'DialerEvent',
|
|
330
356
|
EXTENSIONS_UPDATED = 'ExtensionsUpdated',
|
|
357
|
+
ALL_VOICEBOTS_STATUS = 'AllVoicebotsStatus',
|
|
358
|
+
VOICEBOT_SUBSCRIBE_TO_CALL_FAILED = 'subscribeToCallFailed',
|
|
359
|
+
VOICEBOT_SUBSCRIBED_TO_CALL = 'subscribedToCall',
|
|
360
|
+
VOICEBOT_INITIAL_CALL_HISTORY = 'initialCallHistory',
|
|
361
|
+
VOICEBOT_UNSUBSCRIBED_FROM_CALL = 'unsubscribedFromCall',
|
|
362
|
+
VOICEBOT_EVENT = 'VoicebotEvent',
|
|
331
363
|
}
|
|
332
364
|
|
|
333
365
|
/**
|
|
@@ -576,6 +608,10 @@ export declare type ExtensionCall = {
|
|
|
576
608
|
*/
|
|
577
609
|
callername: string;
|
|
578
610
|
callstatus: CallStatusEnum;
|
|
611
|
+
/**
|
|
612
|
+
* cam id
|
|
613
|
+
*/
|
|
614
|
+
campaignID?: string;
|
|
579
615
|
customdata: CustomData;
|
|
580
616
|
/**
|
|
581
617
|
* Is internal
|
|
@@ -760,6 +796,18 @@ export declare interface ExternalLoginResponse<T> {
|
|
|
760
796
|
*/
|
|
761
797
|
export declare type GenericEventWrapper = EventWrappedSocketDataMap[EventTypeNames]
|
|
762
798
|
|
|
799
|
+
export declare type InitialVoicebotCallHistory = {
|
|
800
|
+
history: Array<VoicebotEventDataCall>;
|
|
801
|
+
/**
|
|
802
|
+
* Voicebot id
|
|
803
|
+
*/
|
|
804
|
+
voicebotID: number;
|
|
805
|
+
/**
|
|
806
|
+
* Ivr unique id
|
|
807
|
+
*/
|
|
808
|
+
IvrUniqueID: string;
|
|
809
|
+
};
|
|
810
|
+
|
|
763
811
|
export declare type KeepAliveResponseEvent = {
|
|
764
812
|
/**
|
|
765
813
|
* Is ok
|
|
@@ -888,7 +936,8 @@ export declare type LoginSuccessEventSDK = EventTypeData<EventsEnum.LOGIN_SUCCES
|
|
|
888
936
|
|
|
889
937
|
export declare enum LoginType {
|
|
890
938
|
USER = "User",
|
|
891
|
-
TOKEN = "Token"
|
|
939
|
+
TOKEN = "Token",
|
|
940
|
+
JWT = "Jwt"
|
|
892
941
|
}
|
|
893
942
|
|
|
894
943
|
export declare type OnlineStatusEvent = {
|
|
@@ -1092,7 +1141,9 @@ export declare type ServerEmitEventCallbackRegistry = {
|
|
|
1092
1141
|
*/
|
|
1093
1142
|
export declare interface ServerEmitEventDataMap {
|
|
1094
1143
|
[ServerListenerEventsEnum.UPDATE_MONITORED_EXTENSIONS]: UpdateMonitoredExtensionsPayload
|
|
1095
|
-
[ServerListenerEventsEnum.KEEP_ALIVE]: string
|
|
1144
|
+
[ServerListenerEventsEnum.KEEP_ALIVE]: string,
|
|
1145
|
+
[ServerListenerEventsEnum.SUBSCRIBE_VOICEBOT_CALL_UPDATES]: SubscriptionVoicebotCallUpdatesPayload,
|
|
1146
|
+
[ServerListenerEventsEnum.UNSUBSCRIBE_VOICEBOT_CALL_UPDATES]: SubscriptionVoicebotCallUpdatesPayload
|
|
1096
1147
|
}
|
|
1097
1148
|
|
|
1098
1149
|
/**
|
|
@@ -1103,7 +1154,9 @@ export declare type ServerEmitEventTypeNames = keyof ServerEmitEventDataMap
|
|
|
1103
1154
|
|
|
1104
1155
|
export declare enum ServerListenerEventsEnum {
|
|
1105
1156
|
UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions",
|
|
1106
|
-
KEEP_ALIVE = "keepalive"
|
|
1157
|
+
KEEP_ALIVE = "keepalive",
|
|
1158
|
+
SUBSCRIBE_VOICEBOT_CALL_UPDATES = "subscribeVoicebotCallUpdates",
|
|
1159
|
+
UNSUBSCRIBE_VOICEBOT_CALL_UPDATES = "unsubscribeVoicebotCallUpdates"
|
|
1107
1160
|
}
|
|
1108
1161
|
|
|
1109
1162
|
export declare enum ServerParameter {
|
|
@@ -1209,6 +1262,12 @@ declare class SocketIoClass {
|
|
|
1209
1262
|
private onQueueEvent;
|
|
1210
1263
|
private onExtensionEvent;
|
|
1211
1264
|
private onDialerEvent;
|
|
1265
|
+
private onVoicebotEvent;
|
|
1266
|
+
private onAllVoicebotsStatus;
|
|
1267
|
+
private onVoicebotSubscribedToCall;
|
|
1268
|
+
private onVoicebotSubscribeToCallFailed;
|
|
1269
|
+
private onVoicebotInitialCallHistory;
|
|
1270
|
+
private onVoicebotUnsubscribedFromCall;
|
|
1212
1271
|
private onLoginStatusEvent;
|
|
1213
1272
|
private onAllExtensionStatus;
|
|
1214
1273
|
private onAllDialerStatus;
|
|
@@ -1241,6 +1300,37 @@ declare class SocketIoClass {
|
|
|
1241
1300
|
|
|
1242
1301
|
export declare type SocketTyped = Socket_2<EventCallbackRegistry, ServerEmitEventCallbackRegistry>
|
|
1243
1302
|
|
|
1303
|
+
export declare type SubscribedToVoicebotCall = {
|
|
1304
|
+
/**
|
|
1305
|
+
* subscribe success?
|
|
1306
|
+
*/
|
|
1307
|
+
success: boolean;
|
|
1308
|
+
/**
|
|
1309
|
+
* voicebot id
|
|
1310
|
+
*/
|
|
1311
|
+
voicebotID: number;
|
|
1312
|
+
/**
|
|
1313
|
+
* ivr id
|
|
1314
|
+
*/
|
|
1315
|
+
IvrUniqueID: string;
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
export declare type SubscribeToVoicebotCallFailed = {
|
|
1319
|
+
/**
|
|
1320
|
+
* error
|
|
1321
|
+
*/
|
|
1322
|
+
error: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* success
|
|
1325
|
+
*/
|
|
1326
|
+
success: boolean;
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
export declare interface SubscriptionVoicebotCallUpdatesPayload {
|
|
1330
|
+
voicebotID: number,
|
|
1331
|
+
IvrUniqueID: string
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1244
1334
|
export declare type Summery = {
|
|
1245
1335
|
/**
|
|
1246
1336
|
* Representative
|
|
@@ -1254,6 +1344,9 @@ export declare type TestEventListener = (event: { test: string }) => void
|
|
|
1254
1344
|
|
|
1255
1345
|
declare type TypedSocketIo = (...args: Parameters<typeof io>) => SocketTyped;
|
|
1256
1346
|
|
|
1347
|
+
export declare type UnsubscribedFromVoicebotCall = {
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1257
1350
|
export declare interface UpdateMonitoredExtensionsPayload {
|
|
1258
1351
|
extensionsString: string
|
|
1259
1352
|
}
|
|
@@ -1277,6 +1370,146 @@ export declare type User = {
|
|
|
1277
1370
|
|
|
1278
1371
|
export declare type UserSDK = User
|
|
1279
1372
|
|
|
1373
|
+
export declare type Voicebot = {
|
|
1374
|
+
Calls: Array<VoicebotEventDataCall>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Acc id
|
|
1377
|
+
*/
|
|
1378
|
+
AccountID: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* Voicebot id
|
|
1381
|
+
*/
|
|
1382
|
+
VoicebotID: number;
|
|
1383
|
+
/**
|
|
1384
|
+
* Voicebot name
|
|
1385
|
+
*/
|
|
1386
|
+
VoicebotName: string;
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
export declare type VoicebotCall = {
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
export declare type VoicebotCallHistory = {
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1395
|
+
export declare type VoicebotEvent = {
|
|
1396
|
+
data: VoicebotEventData;
|
|
1397
|
+
type: VoicebotEventTypeEnum;
|
|
1398
|
+
reason: VoicebotEventReasonEnum;
|
|
1399
|
+
/**
|
|
1400
|
+
* Event name (voicebot)
|
|
1401
|
+
*/
|
|
1402
|
+
eventName: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* servertime
|
|
1405
|
+
*/
|
|
1406
|
+
servertime: number;
|
|
1407
|
+
/**
|
|
1408
|
+
* servertimeoffset
|
|
1409
|
+
*/
|
|
1410
|
+
servertimeoffset: number;
|
|
1411
|
+
/**
|
|
1412
|
+
* telephonyservertime
|
|
1413
|
+
*/
|
|
1414
|
+
telephonyservertime: number;
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
export declare type VoicebotEventData = {
|
|
1418
|
+
Call: VoicebotEventDataCall;
|
|
1419
|
+
/**
|
|
1420
|
+
* account id
|
|
1421
|
+
*/
|
|
1422
|
+
AccountID: number;
|
|
1423
|
+
/**
|
|
1424
|
+
* voicebot id
|
|
1425
|
+
*/
|
|
1426
|
+
VoicebotID: number;
|
|
1427
|
+
/**
|
|
1428
|
+
* ivr id
|
|
1429
|
+
*/
|
|
1430
|
+
IvrUniqueID: string;
|
|
1431
|
+
/**
|
|
1432
|
+
* voicebot name
|
|
1433
|
+
*/
|
|
1434
|
+
VoicebotName: string;
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
export declare type VoicebotEventDataCall = {
|
|
1438
|
+
/**
|
|
1439
|
+
* did
|
|
1440
|
+
*/
|
|
1441
|
+
did: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* ivrid
|
|
1444
|
+
*/
|
|
1445
|
+
ivrid: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* CallerID
|
|
1448
|
+
*/
|
|
1449
|
+
CallerID: string;
|
|
1450
|
+
/**
|
|
1451
|
+
* callType
|
|
1452
|
+
*/
|
|
1453
|
+
callType: string;
|
|
1454
|
+
/**
|
|
1455
|
+
* aiSummary
|
|
1456
|
+
*/
|
|
1457
|
+
aiSummary: string;
|
|
1458
|
+
direction: VoicebotEventDataCallDirectionEnum;
|
|
1459
|
+
callStatus: VoicebotEventDataCallStatusEnum;
|
|
1460
|
+
/**
|
|
1461
|
+
* callername
|
|
1462
|
+
*/
|
|
1463
|
+
callername?: string;
|
|
1464
|
+
customData: any;
|
|
1465
|
+
eventsData: Array<VoicebotEventDataCallEventsData>;
|
|
1466
|
+
/**
|
|
1467
|
+
* IvrUniqueID
|
|
1468
|
+
*/
|
|
1469
|
+
IvrUniqueID: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* callStarted
|
|
1472
|
+
*/
|
|
1473
|
+
callStarted: number;
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
export declare enum VoicebotEventDataCallDirectionEnum {
|
|
1477
|
+
INCOMING = 'INCOMING',
|
|
1478
|
+
OUTGOING = 'OUTGOING',
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
export declare type VoicebotEventDataCallEventsData = {
|
|
1482
|
+
Role: VoicebotEventDataCallEventsDataRoleEnum;
|
|
1483
|
+
Type: VoicebotEventDataCallEventsDataTypeEnum;
|
|
1484
|
+
ToolName?: string;
|
|
1485
|
+
Timestamp: number;
|
|
1486
|
+
Transcript?: string;
|
|
1487
|
+
};
|
|
1488
|
+
|
|
1489
|
+
export declare type VoicebotEventDataCallEventsDataRoleEnum = {
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
export declare enum VoicebotEventDataCallEventsDataTypeEnum {
|
|
1493
|
+
CALLSTARTED = 'CallStarted',
|
|
1494
|
+
TRANSCRIPT = 'Transcript',
|
|
1495
|
+
TOOL_EXECUTED = 'ToolExecuted',
|
|
1496
|
+
TOOL_RESPONSE = 'ToolResponse',
|
|
1497
|
+
CALL_ENDED = 'CallEnded',
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
export declare enum VoicebotEventDataCallStatusEnum {
|
|
1501
|
+
TALKING = 'Talking',
|
|
1502
|
+
ENDED = 'Ended',
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
export declare enum VoicebotEventReasonEnum {
|
|
1506
|
+
CALLSTARTED = 'CALLSTARTED',
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
export declare enum VoicebotEventTypeEnum {
|
|
1510
|
+
UNKNOWN = 'UNKNOWN',
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1280
1513
|
/**
|
|
1281
1514
|
* The structure of received socket events.
|
|
1282
1515
|
*/
|