customer-module-frontend 2.2.0-beta.0 → 2.2.0-beta.10

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.
@@ -26929,20 +26929,20 @@ const s8 = async (e, n) => (await Kn.patch(
26929
26929
  callState: e.call_state,
26930
26930
  durationSeconds: e.duration_seconds,
26931
26931
  customerPhoneNumber: e.customer_phone_number
26932
- }), Tp = (e, n) => {
26933
- if (n)
26932
+ }), Tp = (e, n, t) => {
26933
+ if (t || n === "voice")
26934
26934
  return "voice";
26935
26935
  if (!e)
26936
26936
  return "email";
26937
- const t = e.toLowerCase();
26938
- return t === "email" ? "email" : t === "slack" ? "slack" : "chat";
26937
+ const a = e.toLowerCase();
26938
+ return a === "email" ? "email" : a === "slack" || a === "space" && n === "slack" ? "slack" : "chat";
26939
26939
  }, Fp = (e, n, t) => {
26940
- const a = Rp(), r = !!e.voice || e.channel === "space";
26940
+ const a = Rp(), r = e.inbox_type === "voice" || !!e.voice;
26941
26941
  if (!a && r) return null;
26942
26942
  const o = e.sm_details || [], l = o[0], s = o.length > 0 ? o[o.length - 1] : null, c = a && !!e.voice;
26943
26943
  return {
26944
26944
  hasAccess: e.has_access,
26945
- type: Tp(e.channel, c),
26945
+ type: Tp(e.channel, e.inbox_type, c),
26946
26946
  status: s?.status,
26947
26947
  senderName: n,
26948
26948
  timestamp: e.created_at ? Dp(e.created_at) : void 0,
@@ -26962,12 +26962,12 @@ const s8 = async (e, n) => (await Kn.patch(
26962
26962
  ...c && { voice: Mp(e.voice) }
26963
26963
  };
26964
26964
  }, Lp = (e) => {
26965
- const n = Rp(), t = !!e.voice || e.channel === "space";
26965
+ const n = Rp(), t = e.inbox_type === "voice" || !!e.voice;
26966
26966
  if (!n && t) return null;
26967
26967
  const a = e.sm_details || [], r = a[0], o = a.length > 0 ? a[a.length - 1] : null, l = n && !!e.voice, s = e.created_at || e.timestamp;
26968
26968
  return {
26969
26969
  hasAccess: e.has_access,
26970
- type: Tp(e.channel, l),
26970
+ type: Tp(e.channel, e.inbox_type, l),
26971
26971
  status: o?.status,
26972
26972
  senderName: e.contact.name,
26973
26973
  timestamp: s ? Dp(s) : void 0,