@voicenter-team/events-sdk 0.0.115 → 0.0.117

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.
@@ -797,7 +797,7 @@ export declare interface ExternalLoginResponse<T> {
797
797
  export declare type GenericEventWrapper = EventWrappedSocketDataMap[EventTypeNames]
798
798
 
799
799
  export declare type InitialVoicebotCallHistory = {
800
- history: Array<any>;
800
+ history: Array<VoicebotEventDataCall>;
801
801
  /**
802
802
  * Voicebot id
803
803
  */
@@ -1370,7 +1370,7 @@ export declare type User = {
1370
1370
  export declare type UserSDK = User
1371
1371
 
1372
1372
  export declare type Voicebot = {
1373
- Calls: Array<any>;
1373
+ Calls: Array<VoicebotEventDataCall>;
1374
1374
  /**
1375
1375
  * Acc id
1376
1376
  */
@@ -1378,11 +1378,11 @@ export declare type Voicebot = {
1378
1378
  /**
1379
1379
  * Voicebot id
1380
1380
  */
1381
- VoicebotID: string;
1381
+ VoicebotID: number;
1382
1382
  /**
1383
1383
  * Voicebot name
1384
1384
  */
1385
- VoicebotName: number;
1385
+ VoicebotName: string;
1386
1386
  };
1387
1387
 
1388
1388
  export declare type VoicebotCall = {
@@ -1392,8 +1392,123 @@ export declare type VoicebotCallHistory = {
1392
1392
  };
1393
1393
 
1394
1394
  export declare type VoicebotEvent = {
1395
+ data: VoicebotEventData;
1396
+ type: VoicebotEventTypeEnum;
1397
+ reason: VoicebotEventReasonEnum;
1398
+ /**
1399
+ * Event name (voicebot)
1400
+ */
1401
+ eventName: string;
1402
+ /**
1403
+ * servertime
1404
+ */
1405
+ servertime: number;
1406
+ /**
1407
+ * servertimeoffset
1408
+ */
1409
+ servertimeoffset: number;
1410
+ /**
1411
+ * telephonyservertime
1412
+ */
1413
+ telephonyservertime: number;
1395
1414
  };
1396
1415
 
1416
+ export declare type VoicebotEventData = {
1417
+ Call: VoicebotEventDataCall;
1418
+ /**
1419
+ * account id
1420
+ */
1421
+ AccountID: number;
1422
+ /**
1423
+ * voicebot id
1424
+ */
1425
+ VoicebotID: number;
1426
+ /**
1427
+ * ivr id
1428
+ */
1429
+ IvrUniqueID: string;
1430
+ /**
1431
+ * voicebot name
1432
+ */
1433
+ VoicebotName: string;
1434
+ };
1435
+
1436
+ export declare type VoicebotEventDataCall = {
1437
+ /**
1438
+ * did
1439
+ */
1440
+ did: string;
1441
+ /**
1442
+ * ivrid
1443
+ */
1444
+ ivrid: string;
1445
+ /**
1446
+ * CallerID
1447
+ */
1448
+ CallerID: string;
1449
+ /**
1450
+ * callType
1451
+ */
1452
+ callType: string;
1453
+ /**
1454
+ * aiSummary
1455
+ */
1456
+ aiSummary: string;
1457
+ direction: VoicebotEventDataCallDirectionEnum;
1458
+ callStatus: VoicebotEventDataCallStatusEnum;
1459
+ /**
1460
+ * callername
1461
+ */
1462
+ callername?: string;
1463
+ customData: any;
1464
+ eventsData: Array<VoicebotEventDataCallEventsData>;
1465
+ /**
1466
+ * IvrUniqueID
1467
+ */
1468
+ IvrUniqueID: string;
1469
+ /**
1470
+ * callStarted
1471
+ */
1472
+ callStarted: number;
1473
+ };
1474
+
1475
+ export declare enum VoicebotEventDataCallDirectionEnum {
1476
+ INCOMING = 'INCOMING',
1477
+ OUTGOING = 'OUTGOING',
1478
+ }
1479
+
1480
+ export declare type VoicebotEventDataCallEventsData = {
1481
+ Role: VoicebotEventDataCallEventsDataRoleEnum;
1482
+ Type: VoicebotEventDataCallEventsDataTypeEnum;
1483
+ ToolName?: string;
1484
+ Timestamp: number;
1485
+ Transcript?: string;
1486
+ };
1487
+
1488
+ export declare type VoicebotEventDataCallEventsDataRoleEnum = {
1489
+ };
1490
+
1491
+ export declare enum VoicebotEventDataCallEventsDataTypeEnum {
1492
+ CALLSTARTED = 'CallStarted',
1493
+ TRANSCRIPT = 'Transcript',
1494
+ TOOL_EXECUTED = 'ToolExecuted',
1495
+ TOOL_RESPONSE = 'ToolResponse',
1496
+ CALL_ENDED = 'CallEnded',
1497
+ }
1498
+
1499
+ export declare enum VoicebotEventDataCallStatusEnum {
1500
+ TALKING = 'Talking',
1501
+ ENDED = 'Ended',
1502
+ }
1503
+
1504
+ export declare enum VoicebotEventReasonEnum {
1505
+ CALLSTARTED = 'CALLSTARTED',
1506
+ }
1507
+
1508
+ export declare enum VoicebotEventTypeEnum {
1509
+ UNKNOWN = 'UNKNOWN',
1510
+ }
1511
+
1397
1512
  /**
1398
1513
  * The structure of received socket events.
1399
1514
  */
@@ -2,8 +2,8 @@ var Ie = Object.defineProperty;
2
2
  var Re = (a, t, e) => t in a ? Ie(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
3
  var q = (a, t, e) => (Re(a, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  import Be from "ws";
5
- import xe, { LevelEnum as z, LogTypeEnum as Y, ActionNameEnum as Q } from "@voicenter-team/socketio-storage-logger";
6
- function Ue(a) {
5
+ import Ue, { LevelEnum as z, LogTypeEnum as Y, ActionNameEnum as Q } from "@voicenter-team/socketio-storage-logger";
6
+ function xe(a) {
7
7
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
8
8
  }
9
9
  var be = { exports: {} }, we = { exports: {} };
@@ -122,8 +122,8 @@ function je(a) {
122
122
  h[n] = (h[n] << 8 | h[n] >>> 24) & 16711935 | (h[n] << 24 | h[n] >>> 8) & 4278255360;
123
123
  h[d >>> 5] |= 128 << d % 32, h[(d + 64 >>> 9 << 4) + 14] = d;
124
124
  for (var p = o._ff, g = o._gg, y = o._hh, b = o._ii, n = 0; n < h.length; n += 16) {
125
- var j = i, U = u, P = l, I = s;
126
- i = p(i, u, l, s, h[n + 0], 7, -680876936), s = p(s, i, u, l, h[n + 1], 12, -389564586), l = p(l, s, i, u, h[n + 2], 17, 606105819), u = p(u, l, s, i, h[n + 3], 22, -1044525330), i = p(i, u, l, s, h[n + 4], 7, -176418897), s = p(s, i, u, l, h[n + 5], 12, 1200080426), l = p(l, s, i, u, h[n + 6], 17, -1473231341), u = p(u, l, s, i, h[n + 7], 22, -45705983), i = p(i, u, l, s, h[n + 8], 7, 1770035416), s = p(s, i, u, l, h[n + 9], 12, -1958414417), l = p(l, s, i, u, h[n + 10], 17, -42063), u = p(u, l, s, i, h[n + 11], 22, -1990404162), i = p(i, u, l, s, h[n + 12], 7, 1804603682), s = p(s, i, u, l, h[n + 13], 12, -40341101), l = p(l, s, i, u, h[n + 14], 17, -1502002290), u = p(u, l, s, i, h[n + 15], 22, 1236535329), i = g(i, u, l, s, h[n + 1], 5, -165796510), s = g(s, i, u, l, h[n + 6], 9, -1069501632), l = g(l, s, i, u, h[n + 11], 14, 643717713), u = g(u, l, s, i, h[n + 0], 20, -373897302), i = g(i, u, l, s, h[n + 5], 5, -701558691), s = g(s, i, u, l, h[n + 10], 9, 38016083), l = g(l, s, i, u, h[n + 15], 14, -660478335), u = g(u, l, s, i, h[n + 4], 20, -405537848), i = g(i, u, l, s, h[n + 9], 5, 568446438), s = g(s, i, u, l, h[n + 14], 9, -1019803690), l = g(l, s, i, u, h[n + 3], 14, -187363961), u = g(u, l, s, i, h[n + 8], 20, 1163531501), i = g(i, u, l, s, h[n + 13], 5, -1444681467), s = g(s, i, u, l, h[n + 2], 9, -51403784), l = g(l, s, i, u, h[n + 7], 14, 1735328473), u = g(u, l, s, i, h[n + 12], 20, -1926607734), i = y(i, u, l, s, h[n + 5], 4, -378558), s = y(s, i, u, l, h[n + 8], 11, -2022574463), l = y(l, s, i, u, h[n + 11], 16, 1839030562), u = y(u, l, s, i, h[n + 14], 23, -35309556), i = y(i, u, l, s, h[n + 1], 4, -1530992060), s = y(s, i, u, l, h[n + 4], 11, 1272893353), l = y(l, s, i, u, h[n + 7], 16, -155497632), u = y(u, l, s, i, h[n + 10], 23, -1094730640), i = y(i, u, l, s, h[n + 13], 4, 681279174), s = y(s, i, u, l, h[n + 0], 11, -358537222), l = y(l, s, i, u, h[n + 3], 16, -722521979), u = y(u, l, s, i, h[n + 6], 23, 76029189), i = y(i, u, l, s, h[n + 9], 4, -640364487), s = y(s, i, u, l, h[n + 12], 11, -421815835), l = y(l, s, i, u, h[n + 15], 16, 530742520), u = y(u, l, s, i, h[n + 2], 23, -995338651), i = b(i, u, l, s, h[n + 0], 6, -198630844), s = b(s, i, u, l, h[n + 7], 10, 1126891415), l = b(l, s, i, u, h[n + 14], 15, -1416354905), u = b(u, l, s, i, h[n + 5], 21, -57434055), i = b(i, u, l, s, h[n + 12], 6, 1700485571), s = b(s, i, u, l, h[n + 3], 10, -1894986606), l = b(l, s, i, u, h[n + 10], 15, -1051523), u = b(u, l, s, i, h[n + 1], 21, -2054922799), i = b(i, u, l, s, h[n + 8], 6, 1873313359), s = b(s, i, u, l, h[n + 15], 10, -30611744), l = b(l, s, i, u, h[n + 6], 15, -1560198380), u = b(u, l, s, i, h[n + 13], 21, 1309151649), i = b(i, u, l, s, h[n + 4], 6, -145523070), s = b(s, i, u, l, h[n + 11], 10, -1120210379), l = b(l, s, i, u, h[n + 2], 15, 718787259), u = b(u, l, s, i, h[n + 9], 21, -343485551), i = i + j >>> 0, u = u + U >>> 0, l = l + P >>> 0, s = s + I >>> 0;
125
+ var j = i, x = u, P = l, I = s;
126
+ i = p(i, u, l, s, h[n + 0], 7, -680876936), s = p(s, i, u, l, h[n + 1], 12, -389564586), l = p(l, s, i, u, h[n + 2], 17, 606105819), u = p(u, l, s, i, h[n + 3], 22, -1044525330), i = p(i, u, l, s, h[n + 4], 7, -176418897), s = p(s, i, u, l, h[n + 5], 12, 1200080426), l = p(l, s, i, u, h[n + 6], 17, -1473231341), u = p(u, l, s, i, h[n + 7], 22, -45705983), i = p(i, u, l, s, h[n + 8], 7, 1770035416), s = p(s, i, u, l, h[n + 9], 12, -1958414417), l = p(l, s, i, u, h[n + 10], 17, -42063), u = p(u, l, s, i, h[n + 11], 22, -1990404162), i = p(i, u, l, s, h[n + 12], 7, 1804603682), s = p(s, i, u, l, h[n + 13], 12, -40341101), l = p(l, s, i, u, h[n + 14], 17, -1502002290), u = p(u, l, s, i, h[n + 15], 22, 1236535329), i = g(i, u, l, s, h[n + 1], 5, -165796510), s = g(s, i, u, l, h[n + 6], 9, -1069501632), l = g(l, s, i, u, h[n + 11], 14, 643717713), u = g(u, l, s, i, h[n + 0], 20, -373897302), i = g(i, u, l, s, h[n + 5], 5, -701558691), s = g(s, i, u, l, h[n + 10], 9, 38016083), l = g(l, s, i, u, h[n + 15], 14, -660478335), u = g(u, l, s, i, h[n + 4], 20, -405537848), i = g(i, u, l, s, h[n + 9], 5, 568446438), s = g(s, i, u, l, h[n + 14], 9, -1019803690), l = g(l, s, i, u, h[n + 3], 14, -187363961), u = g(u, l, s, i, h[n + 8], 20, 1163531501), i = g(i, u, l, s, h[n + 13], 5, -1444681467), s = g(s, i, u, l, h[n + 2], 9, -51403784), l = g(l, s, i, u, h[n + 7], 14, 1735328473), u = g(u, l, s, i, h[n + 12], 20, -1926607734), i = y(i, u, l, s, h[n + 5], 4, -378558), s = y(s, i, u, l, h[n + 8], 11, -2022574463), l = y(l, s, i, u, h[n + 11], 16, 1839030562), u = y(u, l, s, i, h[n + 14], 23, -35309556), i = y(i, u, l, s, h[n + 1], 4, -1530992060), s = y(s, i, u, l, h[n + 4], 11, 1272893353), l = y(l, s, i, u, h[n + 7], 16, -155497632), u = y(u, l, s, i, h[n + 10], 23, -1094730640), i = y(i, u, l, s, h[n + 13], 4, 681279174), s = y(s, i, u, l, h[n + 0], 11, -358537222), l = y(l, s, i, u, h[n + 3], 16, -722521979), u = y(u, l, s, i, h[n + 6], 23, 76029189), i = y(i, u, l, s, h[n + 9], 4, -640364487), s = y(s, i, u, l, h[n + 12], 11, -421815835), l = y(l, s, i, u, h[n + 15], 16, 530742520), u = y(u, l, s, i, h[n + 2], 23, -995338651), i = b(i, u, l, s, h[n + 0], 6, -198630844), s = b(s, i, u, l, h[n + 7], 10, 1126891415), l = b(l, s, i, u, h[n + 14], 15, -1416354905), u = b(u, l, s, i, h[n + 5], 21, -57434055), i = b(i, u, l, s, h[n + 12], 6, 1700485571), s = b(s, i, u, l, h[n + 3], 10, -1894986606), l = b(l, s, i, u, h[n + 10], 15, -1051523), u = b(u, l, s, i, h[n + 1], 21, -2054922799), i = b(i, u, l, s, h[n + 8], 6, 1873313359), s = b(s, i, u, l, h[n + 15], 10, -30611744), l = b(l, s, i, u, h[n + 6], 15, -1560198380), u = b(u, l, s, i, h[n + 13], 21, 1309151649), i = b(i, u, l, s, h[n + 4], 6, -145523070), s = b(s, i, u, l, h[n + 11], 10, -1120210379), l = b(l, s, i, u, h[n + 2], 15, 718787259), u = b(u, l, s, i, h[n + 9], 21, -343485551), i = i + j >>> 0, u = u + x >>> 0, l = l + P >>> 0, s = s + I >>> 0;
127
127
  }
128
128
  return a.endian([i, u, l, s]);
129
129
  };
@@ -147,7 +147,7 @@ function je(a) {
147
147
  };
148
148
  })();
149
149
  var Fe = be.exports;
150
- const Pe = /* @__PURE__ */ Ue(Fe);
150
+ const Pe = /* @__PURE__ */ xe(Fe);
151
151
  var ne = /* @__PURE__ */ ((a) => (a.BOOTSTRAP = "bootstrap", a.DEBUG_EXTENSIONS = "debugExtensions", a.DEBUG_QUEUE = "debugQueue", a.DEBUG_DIALER = "debugDialer", a.FULL = "full", a))(ne || {}), se = /* @__PURE__ */ ((a) => (a.MAIN = "main", a.NEXT = "next", a))(se || {}), Z = /* @__PURE__ */ ((a) => (a.USER = "User", a.TOKEN = "Token", a))(Z || {});
152
152
  class ce {
153
153
  static async getSessionStorageDataByKey(t, e = !0) {
@@ -446,10 +446,10 @@ function qe() {
446
446
  this.readyState = "opening", this.skipReconnect = !1;
447
447
  var g = h(n, "open", function() {
448
448
  p.onopen(), s && s();
449
- }), y = h(n, "error", function(U) {
450
- if (i("connect_error"), p.cleanup(), p.readyState = "closed", p.emitAll("connect_error", U), s) {
449
+ }), y = h(n, "error", function(x) {
450
+ if (i("connect_error"), p.cleanup(), p.readyState = "closed", p.emitAll("connect_error", x), s) {
451
451
  var P = new Error("Connection error");
452
- P.data = U, s(P);
452
+ P.data = x, s(P);
453
453
  } else
454
454
  p.maybeReconnectOnOpen();
455
455
  });
@@ -918,15 +918,15 @@ function qe() {
918
918
  function j() {
919
919
  y("socket closed");
920
920
  }
921
- function U(A) {
921
+ function x(A) {
922
922
  I && A.name != I.name && (h('"%s" works - aborting "%s"', A.name, I.name), g());
923
923
  }
924
924
  function P() {
925
- I.removeListener("open", p), I.removeListener("error", y), I.removeListener("close", b), w.removeListener("close", j), w.removeListener("upgrading", U);
925
+ I.removeListener("open", p), I.removeListener("error", y), I.removeListener("close", b), w.removeListener("close", j), w.removeListener("upgrading", x);
926
926
  }
927
927
  h('probing transport "%s"', n);
928
928
  var I = this.createTransport(n, { probe: 1 }), k = !1, w = this;
929
- r.priorWebsocketSuccess = !1, I.once("open", p), I.once("error", y), I.once("close", b), this.once("close", j), this.once("upgrading", U), I.open();
929
+ r.priorWebsocketSuccess = !1, I.once("open", p), I.once("error", y), I.once("close", b), this.once("close", j), this.once("upgrading", x), I.open();
930
930
  }, r.prototype.onOpen = function() {
931
931
  if (h("socket open"), this.readyState = "open", r.priorWebsocketSuccess = this.transport.name == "websocket", this.emit("open"), this.flush(), this.readyState == "open" && this.upgrade && this.transport.pause) {
932
932
  h("starting upgrade probes");
@@ -1111,8 +1111,8 @@ function qe() {
1111
1111
  p.onError("jsonp polling iframe removal error", P);
1112
1112
  }
1113
1113
  try {
1114
- var U = '<iframe src="javascript:0" name="' + p.iframeId + '">';
1115
- g = document.createElement(U);
1114
+ var x = '<iframe src="javascript:0" name="' + p.iframeId + '">';
1115
+ g = document.createElement(x);
1116
1116
  } catch {
1117
1117
  g = document.createElement("iframe"), g.name = p.iframeId, g.src = "javascript:0";
1118
1118
  }
@@ -1420,15 +1420,15 @@ function qe() {
1420
1420
  g.diff = b, g.prev = i, g.curr = y, i = y, g.useColors == null && (g.useColors = e.useColors()), g.color == null && g.useColors && (g.color = r());
1421
1421
  var j = Array.prototype.slice.call(arguments);
1422
1422
  j[0] = e.coerce(j[0]), typeof j[0] != "string" && (j = ["%o"].concat(j));
1423
- var U = 0;
1423
+ var x = 0;
1424
1424
  j[0] = j[0].replace(/%([a-z%])/g, function(I, k) {
1425
1425
  if (I === "%%")
1426
1426
  return I;
1427
- U++;
1427
+ x++;
1428
1428
  var w = e.formatters[k];
1429
1429
  if (typeof w == "function") {
1430
- var A = j[U];
1431
- I = w.call(g, A), j.splice(U, 1), U--;
1430
+ var A = j[x];
1431
+ I = w.call(g, A), j.splice(x, 1), x--;
1432
1432
  }
1433
1433
  return I;
1434
1434
  }), typeof e.formatArgs == "function" && (j = e.formatArgs.apply(g, j));
@@ -1551,7 +1551,7 @@ function qe() {
1551
1551
  }
1552
1552
  var i = a("./keys"), u = a("has-binary"), l = a("arraybuffer.slice"), s = a("base64-arraybuffer"), n = a("after"), p = a("utf8"), g = navigator.userAgent.match(/Android/i), y = /PhantomJS/i.test(navigator.userAgent), b = g || y;
1553
1553
  e.protocol = 3;
1554
- var j = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, U = i(j), P = { type: "error", data: "parser error" }, I = a("blob");
1554
+ var j = e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, x = i(j), P = { type: "error", data: "parser error" }, I = a("blob");
1555
1555
  e.encodePacket = function(k, w, A, v) {
1556
1556
  typeof w == "function" && (v = w, w = !1), typeof A == "function" && (v = A, A = null);
1557
1557
  var m = k.data === void 0 ? void 0 : k.data.buffer || k.data;
@@ -1592,15 +1592,15 @@ function qe() {
1592
1592
  return P;
1593
1593
  }
1594
1594
  var m = k.charAt(0);
1595
- return Number(m) == m && U[m] ? k.length > 1 ? {
1596
- type: U[m],
1595
+ return Number(m) == m && x[m] ? k.length > 1 ? {
1596
+ type: x[m],
1597
1597
  data: k.substring(1)
1598
- } : { type: U[m] } : P;
1598
+ } : { type: x[m] } : P;
1599
1599
  }
1600
1600
  var v = new Uint8Array(k), m = v[0], O = l(k, 1);
1601
- return I && w === "blob" && (O = new I([O])), { type: U[m], data: O };
1601
+ return I && w === "blob" && (O = new I([O])), { type: x[m], data: O };
1602
1602
  }, e.decodeBase64Packet = function(k, w) {
1603
- var A = U[k.charAt(0)];
1603
+ var A = x[k.charAt(0)];
1604
1604
  if (!r.ArrayBuffer)
1605
1605
  return { type: A, data: { base64: !0, data: k.substr(1) } };
1606
1606
  var v = s.decode(k.substr(1));
@@ -1859,20 +1859,20 @@ function qe() {
1859
1859
  return S;
1860
1860
  }
1861
1861
  function l() {
1862
- if (U >= j)
1862
+ if (x >= j)
1863
1863
  throw Error("Invalid byte index");
1864
- var v = 255 & b[U];
1865
- if (U++, (192 & v) == 128)
1864
+ var v = 255 & b[x];
1865
+ if (x++, (192 & v) == 128)
1866
1866
  return 63 & v;
1867
1867
  throw Error("Invalid continuation byte");
1868
1868
  }
1869
1869
  function s() {
1870
1870
  var v, m, O, B, R;
1871
- if (U > j)
1871
+ if (x > j)
1872
1872
  throw Error("Invalid byte index");
1873
- if (U == j)
1873
+ if (x == j)
1874
1874
  return !1;
1875
- if (v = 255 & b[U], U++, (128 & v) == 0)
1875
+ if (v = 255 & b[x], x++, (128 & v) == 0)
1876
1876
  return v;
1877
1877
  if ((224 & v) == 192) {
1878
1878
  var m = l();
@@ -1890,14 +1890,14 @@ function qe() {
1890
1890
  throw Error("Invalid UTF-8 detected");
1891
1891
  }
1892
1892
  function n(v) {
1893
- b = c(v), j = b.length, U = 0;
1893
+ b = c(v), j = b.length, x = 0;
1894
1894
  for (var m, O = []; (m = s()) !== !1; )
1895
1895
  O.push(m);
1896
1896
  return f(O);
1897
1897
  }
1898
1898
  var p = typeof e == "object" && e, g = typeof t == "object" && t && t.exports == p && t, y = typeof r == "object" && r;
1899
1899
  (y.global === y || y.window === y) && (o = y);
1900
- var b, j, U, P = String.fromCharCode, I = { version: "2.0.0", encode: u, decode: n };
1900
+ var b, j, x, P = String.fromCharCode, I = { version: "2.0.0", encode: u, decode: n };
1901
1901
  if (p && !p.nodeType)
1902
1902
  if (g)
1903
1903
  g.exports = I;
@@ -2113,7 +2113,7 @@ function qe() {
2113
2113
  }
2114
2114
  function c(g, y) {
2115
2115
  function b(j) {
2116
- var U = n.deconstructPacket(j), P = o(U.packet), I = U.buffers;
2116
+ var x = n.deconstructPacket(j), P = o(x.packet), I = x.buffers;
2117
2117
  I.unshift(P), y(I);
2118
2118
  }
2119
2119
  n.removeBlobs(g, b);
@@ -2134,8 +2134,8 @@ function qe() {
2134
2134
  }
2135
2135
  if (g.charAt(b + 1) == "/")
2136
2136
  for (y.nsp = ""; ++b; ) {
2137
- var U = g.charAt(b);
2138
- if (U == "," || (y.nsp += U, b == g.length))
2137
+ var x = g.charAt(b);
2138
+ if (x == "," || (y.nsp += x, b == g.length))
2139
2139
  break;
2140
2140
  }
2141
2141
  else
@@ -2143,8 +2143,8 @@ function qe() {
2143
2143
  var P = g.charAt(b + 1);
2144
2144
  if (P !== "" && Number(P) == P) {
2145
2145
  for (y.id = ""; ++b; ) {
2146
- var U = g.charAt(b);
2147
- if (U == null || Number(U) != U) {
2146
+ var x = g.charAt(b);
2147
+ if (x == null || Number(x) != x) {
2148
2148
  --b;
2149
2149
  break;
2150
2150
  }
@@ -2222,22 +2222,22 @@ function qe() {
2222
2222
  else {
2223
2223
  var T, V = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
2224
2224
  if (E == "json-stringify") {
2225
- var C = u.stringify, x = typeof C == "function" && l;
2226
- if (x) {
2225
+ var C = u.stringify, U = typeof C == "function" && l;
2226
+ if (U) {
2227
2227
  (T = function() {
2228
2228
  return 1;
2229
2229
  }).toJSON = T;
2230
2230
  try {
2231
- x = C(0) === "0" && C(new Number()) === "0" && C(new String()) == '""' && C(d) === h && C(h) === h && C() === h && C(T) === "1" && C([T]) == "[1]" && C([h]) == "[null]" && C(null) == "null" && C([h, d, null]) == "[null,null,null]" && C({ a: [T, !0, !1, null, `\0\b
2231
+ U = C(0) === "0" && C(new Number()) === "0" && C(new String()) == '""' && C(d) === h && C(h) === h && C() === h && C(T) === "1" && C([T]) == "[1]" && C([h]) == "[null]" && C(null) == "null" && C([h, d, null]) == "[null,null,null]" && C({ a: [T, !0, !1, null, `\0\b
2232
2232
  \f\r `] }) == V && C(null, T) === "1" && C([1, 2], null, 1) == `[
2233
2233
  1,
2234
2234
  2
2235
2235
  ]` && C(/* @__PURE__ */ new Date(-864e13)) == '"-271821-04-20T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(864e13)) == '"+275760-09-13T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && C(/* @__PURE__ */ new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
2236
2236
  } catch {
2237
- x = !1;
2237
+ U = !1;
2238
2238
  }
2239
2239
  }
2240
- _ = x;
2240
+ _ = U;
2241
2241
  }
2242
2242
  if (E == "json-parse") {
2243
2243
  var D = u.parse;
@@ -2281,14 +2281,14 @@ function qe() {
2281
2281
  if (!o("json")) {
2282
2282
  var s = "[object Function]", n = "[object Date]", p = "[object Number]", g = "[object String]", y = "[object Array]", b = "[object Boolean]", j = o("bug-string-char-index");
2283
2283
  if (!l)
2284
- var U = Math.floor, P = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], I = function(E, _) {
2285
- return P[_] + 365 * (E - 1970) + U((E - 1969 + (_ = +(_ > 1))) / 4) - U((E - 1901 + _) / 100) + U((E - 1601 + _) / 400);
2284
+ var x = Math.floor, P = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], I = function(E, _) {
2285
+ return P[_] + 365 * (E - 1970) + x((E - 1969 + (_ = +(_ > 1))) / 4) - x((E - 1901 + _) / 100) + x((E - 1601 + _) / 400);
2286
2286
  };
2287
2287
  (c = {}.hasOwnProperty) || (c = function(E) {
2288
2288
  var _, T = {};
2289
2289
  return (T.__proto__ = null, T.__proto__ = { toString: 1 }, T).toString != d ? c = function(V) {
2290
- var C = this.__proto__, x = V in (this.__proto__ = null, this);
2291
- return this.__proto__ = C, x;
2290
+ var C = this.__proto__, U = V in (this.__proto__ = null, this);
2291
+ return this.__proto__ = C, U;
2292
2292
  } : (_ = T.constructor, c = function(V) {
2293
2293
  var C = (this.constructor || _).prototype;
2294
2294
  return V in this && !(V in C && this[V] === C[V]);
@@ -2299,13 +2299,13 @@ function qe() {
2299
2299
  return T == "object" ? !!E[_] : !k[T];
2300
2300
  };
2301
2301
  if (f = function(E, _) {
2302
- var T, V, C, x = 0;
2302
+ var T, V, C, U = 0;
2303
2303
  (T = function() {
2304
2304
  this.valueOf = 0;
2305
2305
  }).prototype.valueOf = 0, V = new T();
2306
2306
  for (C in V)
2307
- c.call(V, C) && x++;
2308
- return T = V = null, x ? f = x == 2 ? function(D, N) {
2307
+ c.call(V, C) && U++;
2308
+ return T = V = null, U ? f = U == 2 ? function(D, N) {
2309
2309
  var F, $ = {}, W = d.call(D) == s;
2310
2310
  for (F in D)
2311
2311
  W && F == "prototype" || c.call($, F) || !($[F] = 1) || !c.call(D, F) || N(F);
@@ -2325,8 +2325,8 @@ function qe() {
2325
2325
  var A = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", m = function(E, _) {
2326
2326
  return (v + (_ || 0)).slice(-E);
2327
2327
  }, O = "\\u00", B = function(E) {
2328
- var _, T = '"', V = 0, C = E.length, x = C > 10 && j;
2329
- for (x && (_ = E.split("")); C > V; V++) {
2328
+ var _, T = '"', V = 0, C = E.length, U = C > 10 && j;
2329
+ for (U && (_ = E.split("")); C > V; V++) {
2330
2330
  var D = E.charCodeAt(V);
2331
2331
  switch (D) {
2332
2332
  case 8:
@@ -2343,11 +2343,11 @@ function qe() {
2343
2343
  T += O + m(2, D.toString(16));
2344
2344
  break;
2345
2345
  }
2346
- T += x ? _[V] : j ? E.charAt(V) : E[V];
2346
+ T += U ? _[V] : j ? E.charAt(V) : E[V];
2347
2347
  }
2348
2348
  }
2349
2349
  return T + '"';
2350
- }, R = function(E, _, T, V, C, x, D) {
2350
+ }, R = function(E, _, T, V, C, U, D) {
2351
2351
  var N, F, $, W, H, ie, he, ue, pe, fe, ee, de, le, ae, ge, ye;
2352
2352
  try {
2353
2353
  N = _[E];
@@ -2358,11 +2358,11 @@ function qe() {
2358
2358
  typeof N.toJSON == "function" && (F != p && F != g && F != y || c.call(N, "toJSON")) && (N = N.toJSON(E));
2359
2359
  else if (N > -1 / 0 && 1 / 0 > N) {
2360
2360
  if (I) {
2361
- for (H = U(N / 864e5), $ = U(H / 365.2425) + 1970 - 1; I($ + 1, 0) <= H; $++)
2361
+ for (H = x(N / 864e5), $ = x(H / 365.2425) + 1970 - 1; I($ + 1, 0) <= H; $++)
2362
2362
  ;
2363
- for (W = U((H - I($, 0)) / 30.42); I($, W + 1) <= H; W++)
2363
+ for (W = x((H - I($, 0)) / 30.42); I($, W + 1) <= H; W++)
2364
2364
  ;
2365
- H = 1 + H - I($, W), ie = (N % 864e5 + 864e5) % 864e5, he = U(ie / 36e5) % 24, ue = U(ie / 6e4) % 60, pe = U(ie / 1e3) % 60, fe = ie % 1e3;
2365
+ H = 1 + H - I($, W), ie = (N % 864e5 + 864e5) % 864e5, he = x(ie / 36e5) % 24, ue = x(ie / 6e4) % 60, pe = x(ie / 1e3) % 60, fe = ie % 1e3;
2366
2366
  } else
2367
2367
  $ = N.getUTCFullYear(), W = N.getUTCMonth(), H = N.getUTCDate(), he = N.getUTCHours(), ue = N.getUTCMinutes(), pe = N.getUTCSeconds(), fe = N.getUTCMilliseconds();
2368
2368
  N = (0 >= $ || $ >= 1e4 ? (0 > $ ? "-" : "+") + m(6, 0 > $ ? -$ : $) : m(4, $)) + "-" + m(2, W + 1) + "-" + m(2, H) + "T" + m(2, he) + ":" + m(2, ue) + ":" + m(2, pe) + "." + m(3, fe) + "Z";
@@ -2380,32 +2380,32 @@ function qe() {
2380
2380
  for (ae = D.length; ae--; )
2381
2381
  if (D[ae] === N)
2382
2382
  throw TypeError();
2383
- if (D.push(N), ee = [], ge = x, x += C, F == y) {
2383
+ if (D.push(N), ee = [], ge = U, U += C, F == y) {
2384
2384
  for (le = 0, ae = N.length; ae > le; le++)
2385
- de = R(le, N, T, V, C, x, D), ee.push(de === h ? "null" : de);
2385
+ de = R(le, N, T, V, C, U, D), ee.push(de === h ? "null" : de);
2386
2386
  ye = ee.length ? C ? `[
2387
- ` + x + ee.join(`,
2388
- ` + x) + `
2387
+ ` + U + ee.join(`,
2388
+ ` + U) + `
2389
2389
  ` + ge + "]" : "[" + ee.join(",") + "]" : "[]";
2390
2390
  } else
2391
2391
  f(V || N, function(ve) {
2392
- var Ee = R(ve, N, T, V, C, x, D);
2392
+ var Ee = R(ve, N, T, V, C, U, D);
2393
2393
  Ee !== h && ee.push(B(ve) + ":" + (C ? " " : "") + Ee);
2394
2394
  }), ye = ee.length ? C ? `{
2395
- ` + x + ee.join(`,
2396
- ` + x) + `
2395
+ ` + U + ee.join(`,
2396
+ ` + U) + `
2397
2397
  ` + ge + "}" : "{" + ee.join(",") + "}" : "{}";
2398
2398
  return D.pop(), ye;
2399
2399
  }
2400
2400
  };
2401
2401
  u.stringify = function(E, _, T) {
2402
- var V, C, x, D;
2402
+ var V, C, U, D;
2403
2403
  if (typeof _ == "function" || typeof _ == "object" && _) {
2404
2404
  if ((D = d.call(_)) == s)
2405
2405
  C = _;
2406
2406
  else if (D == y) {
2407
- x = {};
2408
- for (var N, F = 0, $ = _.length; $ > F; N = _[F++], D = d.call(N), (D == g || D == p) && (x[N] = 1))
2407
+ U = {};
2408
+ for (var N, F = 0, $ = _.length; $ > F; N = _[F++], D = d.call(N), (D == g || D == p) && (U[N] = 1))
2409
2409
  ;
2410
2410
  }
2411
2411
  }
@@ -2416,7 +2416,7 @@ function qe() {
2416
2416
  ;
2417
2417
  } else
2418
2418
  D == g && (V = T.length <= 10 ? T : T.slice(0, 10));
2419
- return R("", (N = {}, N[""] = E, N), C, x, V, "", []);
2419
+ return R("", (N = {}, N[""] = E, N), C, U, V, "", []);
2420
2420
  };
2421
2421
  }
2422
2422
  if (!o("json-parse")) {
@@ -2424,8 +2424,8 @@ function qe() {
2424
2424
  `, 102: "\f", 114: "\r" }, M = function() {
2425
2425
  throw S = X = null, SyntaxError();
2426
2426
  }, J = function() {
2427
- for (var E, _, T, V, C, x = X, D = x.length; D > S; )
2428
- switch (C = x.charCodeAt(S)) {
2427
+ for (var E, _, T, V, C, U = X, D = U.length; D > S; )
2428
+ switch (C = U.charCodeAt(S)) {
2429
2429
  case 9:
2430
2430
  case 10:
2431
2431
  case 13:
@@ -2438,13 +2438,13 @@ function qe() {
2438
2438
  case 93:
2439
2439
  case 58:
2440
2440
  case 44:
2441
- return E = j ? x.charAt(S) : x[S], S++, E;
2441
+ return E = j ? U.charAt(S) : U[S], S++, E;
2442
2442
  case 34:
2443
2443
  for (E = "@", S++; D > S; )
2444
- if (C = x.charCodeAt(S), 32 > C)
2444
+ if (C = U.charCodeAt(S), 32 > C)
2445
2445
  M();
2446
2446
  else if (C == 92)
2447
- switch (C = x.charCodeAt(++S)) {
2447
+ switch (C = U.charCodeAt(++S)) {
2448
2448
  case 92:
2449
2449
  case 34:
2450
2450
  case 47:
@@ -2457,8 +2457,8 @@ function qe() {
2457
2457
  break;
2458
2458
  case 117:
2459
2459
  for (_ = ++S, T = S + 4; T > S; S++)
2460
- C = x.charCodeAt(S), C >= 48 && 57 >= C || C >= 97 && 102 >= C || C >= 65 && 70 >= C || M();
2461
- E += K("0x" + x.slice(_, S));
2460
+ C = U.charCodeAt(S), C >= 48 && 57 >= C || C >= 97 && 102 >= C || C >= 65 && 70 >= C || M();
2461
+ E += K("0x" + U.slice(_, S));
2462
2462
  break;
2463
2463
  default:
2464
2464
  M();
@@ -2466,34 +2466,34 @@ function qe() {
2466
2466
  else {
2467
2467
  if (C == 34)
2468
2468
  break;
2469
- for (C = x.charCodeAt(S), _ = S; C >= 32 && C != 92 && C != 34; )
2470
- C = x.charCodeAt(++S);
2471
- E += x.slice(_, S);
2469
+ for (C = U.charCodeAt(S), _ = S; C >= 32 && C != 92 && C != 34; )
2470
+ C = U.charCodeAt(++S);
2471
+ E += U.slice(_, S);
2472
2472
  }
2473
- if (x.charCodeAt(S) == 34)
2473
+ if (U.charCodeAt(S) == 34)
2474
2474
  return S++, E;
2475
2475
  M();
2476
2476
  default:
2477
- if (_ = S, C == 45 && (V = !0, C = x.charCodeAt(++S)), C >= 48 && 57 >= C) {
2478
- for (C == 48 && (C = x.charCodeAt(S + 1), C >= 48 && 57 >= C) && M(), V = !1; D > S && (C = x.charCodeAt(S), C >= 48 && 57 >= C); S++)
2477
+ if (_ = S, C == 45 && (V = !0, C = U.charCodeAt(++S)), C >= 48 && 57 >= C) {
2478
+ for (C == 48 && (C = U.charCodeAt(S + 1), C >= 48 && 57 >= C) && M(), V = !1; D > S && (C = U.charCodeAt(S), C >= 48 && 57 >= C); S++)
2479
2479
  ;
2480
- if (x.charCodeAt(S) == 46) {
2481
- for (T = ++S; D > T && (C = x.charCodeAt(T), C >= 48 && 57 >= C); T++)
2480
+ if (U.charCodeAt(S) == 46) {
2481
+ for (T = ++S; D > T && (C = U.charCodeAt(T), C >= 48 && 57 >= C); T++)
2482
2482
  ;
2483
2483
  T == S && M(), S = T;
2484
2484
  }
2485
- if (C = x.charCodeAt(S), C == 101 || C == 69) {
2486
- for (C = x.charCodeAt(++S), (C == 43 || C == 45) && S++, T = S; D > T && (C = x.charCodeAt(T), C >= 48 && 57 >= C); T++)
2485
+ if (C = U.charCodeAt(S), C == 101 || C == 69) {
2486
+ for (C = U.charCodeAt(++S), (C == 43 || C == 45) && S++, T = S; D > T && (C = U.charCodeAt(T), C >= 48 && 57 >= C); T++)
2487
2487
  ;
2488
2488
  T == S && M(), S = T;
2489
2489
  }
2490
- return +x.slice(_, S);
2490
+ return +U.slice(_, S);
2491
2491
  }
2492
- if (V && M(), x.slice(S, S + 4) == "true")
2492
+ if (V && M(), U.slice(S, S + 4) == "true")
2493
2493
  return S += 4, !0;
2494
- if (x.slice(S, S + 5) == "false")
2494
+ if (U.slice(S, S + 5) == "false")
2495
2495
  return S += 5, !1;
2496
- if (x.slice(S, S + 4) == "null")
2496
+ if (U.slice(S, S + 4) == "null")
2497
2497
  return S += 4, null;
2498
2498
  M();
2499
2499
  }
@@ -2526,8 +2526,8 @@ function qe() {
2526
2526
  for (V = C.length; V--; )
2527
2527
  Ce(C, V, T);
2528
2528
  else
2529
- f(C, function(x) {
2530
- Ce(C, x, T);
2529
+ f(C, function(U) {
2530
+ Ce(C, U, T);
2531
2531
  });
2532
2532
  return T.call(E, _, C);
2533
2533
  };
@@ -2657,10 +2657,13 @@ class te {
2657
2657
  static mapVoicebotInitialCallHistory(t) {
2658
2658
  return {
2659
2659
  ...t,
2660
- history: t.history.map((e) => ({
2661
- ...this.mapVoicebotCall(t, e),
2662
- eventsData: this.mapVoicebotEventsData(t, e)
2663
- }))
2660
+ history: t.history.map((e) => {
2661
+ const r = this.mapVoicebotCall(t, e);
2662
+ return {
2663
+ ...r,
2664
+ eventsData: r.eventsData.map((o) => this.mapVoicebotEventsData(t, o))
2665
+ };
2666
+ })
2664
2667
  };
2665
2668
  }
2666
2669
  static mapVoicebotCall(t, e) {
@@ -3080,7 +3083,7 @@ class st {
3080
3083
  this.eventsSdkClass.options.loggerSocketConnection && (t = this.eventsSdkClass.options.loggerSocketConnection), this.eventsSdkClass.socketIoClass.ioFunction && !t && (t = this.eventsSdkClass.socketIoClass.ioFunction(
3081
3084
  this.eventsSdkClass.options.loggerServer,
3082
3085
  this.eventsSdkClass.options.loggerConnectOptions
3083
- )), t && (this.storageLogger = new xe({
3086
+ )), t && (this.storageLogger = new Ue({
3084
3087
  socket: t,
3085
3088
  loggerOptions: this.eventsSdkClass.options.loggerConfig
3086
3089
  }));