glitchgrab 1.61.2 → 1.62.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 CHANGED
@@ -317,6 +317,26 @@ import { listLeads } from "glitchgrab/server";
317
317
  const leads = await listLeads({ source: "demo", since: "2026-09-01" }); // GLITCHGRAB_CALLS_KEY=ggc_…
318
318
  ```
319
319
 
320
+ ## How do I show customer follow-ups in my own admin?
321
+
322
+ Glitchgrab keeps, per customer, the recorded calls, a running note history and the booked next call — and WhatsApps whoever booked it when it is due. After each call a note of what was asked and promised appears by itself, with a suggested next call. Read and write it from your server with the `ggc_` key:
323
+
324
+ ```ts
325
+ import { listFollowUps, setFollowUpBooking, dialFollowUp, addFollowUpNote } from "glitchgrab/server";
326
+
327
+ // One request for a whole list page (≤500 ids): nextCallAt, due, lastNote, noteCount, lastCall
328
+ const rows = await listFollowUps(owners.map((o) => o.id));
329
+
330
+ // The first write for a new id needs its phone
331
+ await addFollowUpNote(owner.id, { body: "Wants WhatsApp receipts", author: "Super Admin", phone: owner.phone });
332
+ await setFollowUpBooking(owner.id, { nextCallAt: new Date("2026-10-27T05:30:00Z"), operator: { email: "admin@you.in" } });
333
+
334
+ // Rings the operator first, then the customer, from your project's Glitchgrab number — recorded
335
+ await dialFollowUp(owner.id, { operator: { email: "admin@you.in" } });
336
+ ```
337
+
338
+ The `operator` must be someone on the project's phone line in Glitchgrab. Webhooks `followup.note_added` and `followup.booking_changed` keep your list fresh without polling.
339
+
320
340
  ## What keyboard shortcuts are available?
321
341
 
322
342
  Once `GlitchgrabProvider` is mounted, these shortcuts work globally:
package/dist/index.js CHANGED
@@ -4027,33 +4027,37 @@ function AssistSheet({
4027
4027
  gap: "6px",
4028
4028
  paddingLeft: "32px"
4029
4029
  },
4030
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4031
- "button",
4032
- {
4033
- type: "button",
4034
- "data-gg-chip": "",
4035
- "data-gg-option": "",
4036
- onClick: () => {
4037
- logEvent("option_tap", option);
4038
- send(option, option === CONFIRM_OPTION);
4039
- },
4040
- style: {
4041
- border: `1px solid ${t.inputBorder}`,
4042
- background: "transparent",
4043
- color: t.textMuted,
4044
- borderRadius: "999px",
4045
- // Same 8px as the picker chips — one tap target size in
4046
- // this sheet, not two.
4047
- padding: "8px 12px",
4048
- fontSize: "12px",
4049
- fontFamily: "inherit",
4050
- cursor: "pointer",
4051
- textAlign: "left"
4030
+ children: options.map((option) => {
4031
+ const primary = option === CONFIRM_OPTION;
4032
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4033
+ "button",
4034
+ {
4035
+ type: "button",
4036
+ "data-gg-chip": "",
4037
+ "data-gg-option": "",
4038
+ onClick: () => {
4039
+ logEvent("option_tap", option);
4040
+ send(option, option === CONFIRM_OPTION);
4041
+ },
4042
+ style: {
4043
+ border: primary ? "1px solid transparent" : `1px solid ${t.inputBorder}`,
4044
+ background: primary ? t.accent : "transparent",
4045
+ color: primary ? t.accentText : t.textMuted,
4046
+ fontWeight: primary ? 600 : void 0,
4047
+ borderRadius: "999px",
4048
+ // Same 8px as the picker chips — one tap target size in
4049
+ // this sheet, not two.
4050
+ padding: "8px 12px",
4051
+ fontSize: "12px",
4052
+ fontFamily: "inherit",
4053
+ cursor: "pointer",
4054
+ textAlign: "left"
4055
+ },
4056
+ children: option
4052
4057
  },
4053
- children: option
4054
- },
4055
- option
4056
- ))
4058
+ option
4059
+ );
4060
+ })
4057
4061
  }
4058
4062
  ),
4059
4063
  busy && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", minWidth: 0 }, role: "status", "aria-label": "Thinking", children: [