@voicenter-team/events-sdk 0.0.113 → 0.0.115

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.
@@ -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<any>;
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
@@ -1092,7 +1140,9 @@ export declare type ServerEmitEventCallbackRegistry = {
1092
1140
  */
1093
1141
  export declare interface ServerEmitEventDataMap {
1094
1142
  [ServerListenerEventsEnum.UPDATE_MONITORED_EXTENSIONS]: UpdateMonitoredExtensionsPayload
1095
- [ServerListenerEventsEnum.KEEP_ALIVE]: string
1143
+ [ServerListenerEventsEnum.KEEP_ALIVE]: string,
1144
+ [ServerListenerEventsEnum.SUBSCRIBE_VOICEBOT_CALL_UPDATES]: SubscriptionVoicebotCallUpdatesPayload,
1145
+ [ServerListenerEventsEnum.UNSUBSCRIBE_VOICEBOT_CALL_UPDATES]: SubscriptionVoicebotCallUpdatesPayload
1096
1146
  }
1097
1147
 
1098
1148
  /**
@@ -1103,7 +1153,9 @@ export declare type ServerEmitEventTypeNames = keyof ServerEmitEventDataMap
1103
1153
 
1104
1154
  export declare enum ServerListenerEventsEnum {
1105
1155
  UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions",
1106
- KEEP_ALIVE = "keepalive"
1156
+ KEEP_ALIVE = "keepalive",
1157
+ SUBSCRIBE_VOICEBOT_CALL_UPDATES = "subscribeVoicebotCallUpdates",
1158
+ UNSUBSCRIBE_VOICEBOT_CALL_UPDATES = "unsubscribeVoicebotCallUpdates"
1107
1159
  }
1108
1160
 
1109
1161
  export declare enum ServerParameter {
@@ -1209,6 +1261,12 @@ declare class SocketIoClass {
1209
1261
  private onQueueEvent;
1210
1262
  private onExtensionEvent;
1211
1263
  private onDialerEvent;
1264
+ private onVoicebotEvent;
1265
+ private onAllVoicebotsStatus;
1266
+ private onVoicebotSubscribedToCall;
1267
+ private onVoicebotSubscribeToCallFailed;
1268
+ private onVoicebotInitialCallHistory;
1269
+ private onVoicebotUnsubscribedFromCall;
1212
1270
  private onLoginStatusEvent;
1213
1271
  private onAllExtensionStatus;
1214
1272
  private onAllDialerStatus;
@@ -1241,6 +1299,37 @@ declare class SocketIoClass {
1241
1299
 
1242
1300
  export declare type SocketTyped = Socket_2<EventCallbackRegistry, ServerEmitEventCallbackRegistry>
1243
1301
 
1302
+ export declare type SubscribedToVoicebotCall = {
1303
+ /**
1304
+ * subscribe success?
1305
+ */
1306
+ success: boolean;
1307
+ /**
1308
+ * voicebot id
1309
+ */
1310
+ voicebotID: number;
1311
+ /**
1312
+ * ivr id
1313
+ */
1314
+ IvrUniqueID: string;
1315
+ };
1316
+
1317
+ export declare type SubscribeToVoicebotCallFailed = {
1318
+ /**
1319
+ * error
1320
+ */
1321
+ error: string;
1322
+ /**
1323
+ * success
1324
+ */
1325
+ success: boolean;
1326
+ };
1327
+
1328
+ export declare interface SubscriptionVoicebotCallUpdatesPayload {
1329
+ voicebotID: number,
1330
+ IvrUniqueID: string
1331
+ }
1332
+
1244
1333
  export declare type Summery = {
1245
1334
  /**
1246
1335
  * Representative
@@ -1254,6 +1343,9 @@ export declare type TestEventListener = (event: { test: string }) => void
1254
1343
 
1255
1344
  declare type TypedSocketIo = (...args: Parameters<typeof io>) => SocketTyped;
1256
1345
 
1346
+ export declare type UnsubscribedFromVoicebotCall = {
1347
+ };
1348
+
1257
1349
  export declare interface UpdateMonitoredExtensionsPayload {
1258
1350
  extensionsString: string
1259
1351
  }
@@ -1277,6 +1369,31 @@ export declare type User = {
1277
1369
 
1278
1370
  export declare type UserSDK = User
1279
1371
 
1372
+ export declare type Voicebot = {
1373
+ Calls: Array<any>;
1374
+ /**
1375
+ * Acc id
1376
+ */
1377
+ AccountID: string;
1378
+ /**
1379
+ * Voicebot id
1380
+ */
1381
+ VoicebotID: string;
1382
+ /**
1383
+ * Voicebot name
1384
+ */
1385
+ VoicebotName: number;
1386
+ };
1387
+
1388
+ export declare type VoicebotCall = {
1389
+ };
1390
+
1391
+ export declare type VoicebotCallHistory = {
1392
+ };
1393
+
1394
+ export declare type VoicebotEvent = {
1395
+ };
1396
+
1280
1397
  /**
1281
1398
  * The structure of received socket events.
1282
1399
  */