@voicenter-team/events-sdk 0.0.58 → 0.0.60

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.
@@ -834,7 +834,7 @@ declare type LoginSuccessEvent = {
834
834
 
835
835
  export declare type LoginSuccessEventSDK = EventTypeData<EventsEnum.LOGIN_SUCCESS>
836
836
 
837
- declare enum LoginType {
837
+ export declare enum LoginType {
838
838
  USER = "User",
839
839
  TOKEN = "Token"
840
840
  }
@@ -154,7 +154,7 @@ class It {
154
154
  if (n[e])
155
155
  return r ? JSON.parse(n[e]) : n[e];
156
156
  }
157
- if (typeof window < "u") {
157
+ if (typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.getItem == "function") {
158
158
  const n = window.sessionStorage.getItem(e);
159
159
  if (n)
160
160
  return r ? JSON.parse(n) : n;
@@ -163,10 +163,10 @@ class It {
163
163
  static async updateSessionStorageKey(e, r) {
164
164
  typeof chrome < "u" && typeof chrome.storage < "u" && await chrome.storage.session.set({
165
165
  [e]: JSON.stringify(r)
166
- }), typeof window < "u" && window.sessionStorage.setItem(e, JSON.stringify(r));
166
+ }), typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.setItem == "function" && window.sessionStorage.setItem(e, JSON.stringify(r));
167
167
  }
168
168
  static clearSessionStorage() {
169
- typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && window.sessionStorage.clear();
169
+ typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.clear == "function" && window.sessionStorage.clear();
170
170
  }
171
171
  }
172
172
  var Br = Object.defineProperty, _r = (t, e, r) => e in t ? Br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, V = (t, e, r) => (_r(t, typeof e != "symbol" ? e + "" : e, r), r);
@@ -2893,7 +2893,7 @@ const Io = {
2893
2893
  }
2894
2894
  };
2895
2895
  function Bo() {
2896
- return function t(e, r, n) {
2896
+ return window && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), function t(e, r, n) {
2897
2897
  function o(h, d) {
2898
2898
  if (!r[h]) {
2899
2899
  if (!e[h]) {
@@ -5570,6 +5570,7 @@ export {
5570
5570
  z as EventsEnum,
5571
5571
  wr as ExtensionEventReasonEnum,
5572
5572
  Wo as ExtensionHangupCauseEnum,
5573
+ it as LoginType,
5573
5574
  Ko as QueueEventReasonEnum,
5574
5575
  Sr as ServerListenerEventsEnum,
5575
5576
  Go as default