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 +20 -0
- package/dist/index.js +30 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -26
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +124 -1
- package/dist/server.d.ts +124 -1
- package/dist/server.js +132 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +127 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
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) =>
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
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
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
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: [
|