glitchgrab 1.62.4 → 1.63.0
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/README.md +5 -1
- package/dist/index.js +18 -154
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -154
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +20 -2
- package/dist/server.d.ts +20 -2
- package/dist/server.js +15 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +14 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/dist/server.mjs
CHANGED
|
@@ -733,6 +733,7 @@ function readFollowUpDetail(value) {
|
|
|
733
733
|
author: stringOrNull(n.author),
|
|
734
734
|
callId: stringOrNull(n.callId),
|
|
735
735
|
editedAt: stringOrNull(n.editedAt),
|
|
736
|
+
editedBy: stringOrNull(n.editedBy),
|
|
736
737
|
createdAt: (_b = stringOrNull(n.createdAt)) != null ? _b : ""
|
|
737
738
|
};
|
|
738
739
|
}) : [],
|
|
@@ -801,10 +802,21 @@ async function getFollowUp(externalId, options = {}) {
|
|
|
801
802
|
}
|
|
802
803
|
}
|
|
803
804
|
function addFollowUpNote(externalId, note, options = {}) {
|
|
804
|
-
|
|
805
|
+
const iso = (v) => v instanceof Date ? v.toISOString() : v;
|
|
806
|
+
const body = { ...note, createdAt: iso(note.createdAt), editedAt: iso(note.editedAt) };
|
|
807
|
+
return writeFollowUp(followUpPath(externalId, "/notes"), "POST", body, options, (d) => ({
|
|
805
808
|
id: typeof d.id === "string" ? d.id : ""
|
|
806
809
|
}));
|
|
807
810
|
}
|
|
811
|
+
function editFollowUpNote(externalId, noteId, edit, options = {}) {
|
|
812
|
+
return writeFollowUp(
|
|
813
|
+
followUpPath(externalId, `/notes/${encodeURIComponent(noteId)}`),
|
|
814
|
+
"PATCH",
|
|
815
|
+
edit,
|
|
816
|
+
options,
|
|
817
|
+
(d) => ({ id: typeof d.id === "string" ? d.id : "" })
|
|
818
|
+
);
|
|
819
|
+
}
|
|
808
820
|
function setFollowUpBooking(externalId, booking, options = {}) {
|
|
809
821
|
const at = booking.nextCallAt instanceof Date ? booking.nextCallAt.toISOString() : booking.nextCallAt;
|
|
810
822
|
return writeFollowUp(followUpPath(externalId, "/booking"), "PUT", { ...booking, nextCallAt: at }, options, (d) => ({
|
|
@@ -946,6 +958,7 @@ export {
|
|
|
946
958
|
deleteCall,
|
|
947
959
|
dialFollowUp,
|
|
948
960
|
discardBookingQuestionsDraft,
|
|
961
|
+
editFollowUpNote,
|
|
949
962
|
escapeJsonForScript,
|
|
950
963
|
getBookingSettings,
|
|
951
964
|
getCall,
|