glitchgrab 1.62.2 → 1.62.4

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/server.mjs CHANGED
@@ -689,9 +689,18 @@ function readFollowUp(value) {
689
689
  externalId: stringOrNull(value.externalId),
690
690
  phone: stringOrNull(value.phone),
691
691
  name: stringOrNull(value.name),
692
+ businessName: stringOrNull(value.businessName),
692
693
  nextCallAt: stringOrNull(value.nextCallAt),
693
694
  nextCallBookedBy: stringOrNull(value.nextCallBookedBy),
694
695
  due: typeof value.due === "string" && DUES.has(value.due) ? value.due : "none",
696
+ booking: isRecord(value.booking) && typeof value.booking.at === "string" ? {
697
+ at: value.booking.at,
698
+ reason: stringOrNull(value.booking.reason),
699
+ auto: value.booking.auto === true,
700
+ confirmedAt: stringOrNull(value.booking.confirmedAt),
701
+ askedOnWhatsApp: value.booking.askedOnWhatsApp === true,
702
+ bookedBy: stringOrNull(value.booking.bookedBy)
703
+ } : null,
695
704
  suggestedNextCallAt: stringOrNull(value.suggestedNextCallAt),
696
705
  suggestedNextCallReason: stringOrNull(value.suggestedNextCallReason),
697
706
  lastNote: stringOrNull(value.lastNote),
@@ -737,6 +746,9 @@ function readFollowUpDetail(value) {
737
746
  durationSec: numberOrNull(c.durationSec),
738
747
  ringingIndex: numberOrNull(c.ringingIndex),
739
748
  ringingPhone: stringOrNull(c.ringingPhone),
749
+ to: stringOrNull(c.to),
750
+ missedBy: c.missedBy === "operator" || c.missedBy === "customer" ? c.missedBy : null,
751
+ operatorName: stringOrNull(c.operatorName),
740
752
  shared: c.shared === true,
741
753
  overview: stringOrNull(c.overview),
742
754
  recordingUrl: stringOrNull(c.recordingUrl)
@@ -796,7 +808,8 @@ function addFollowUpNote(externalId, note, options = {}) {
796
808
  function setFollowUpBooking(externalId, booking, options = {}) {
797
809
  const at = booking.nextCallAt instanceof Date ? booking.nextCallAt.toISOString() : booking.nextCallAt;
798
810
  return writeFollowUp(followUpPath(externalId, "/booking"), "PUT", { ...booking, nextCallAt: at }, options, (d) => ({
799
- nextCallAt: stringOrNull(d.nextCallAt)
811
+ nextCallAt: stringOrNull(d.nextCallAt),
812
+ reason: stringOrNull(d.reason)
800
813
  }));
801
814
  }
802
815
  function dialFollowUp(externalId, call, options = {}) {