glitchgrab 1.65.2 → 1.66.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 +13 -5
- package/dist/index.d.mts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +525 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +524 -41
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +47 -4
- package/dist/server.d.ts +47 -4
- package/dist/server.js +29 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +28 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1218,15 +1218,18 @@ if (!saved.ok) console.error(saved.error); // e.g. WhatsApp code already taken
|
|
|
1218
1218
|
### Asking questions before a demo is booked
|
|
1219
1219
|
|
|
1220
1220
|
Set `questions` and the booking dialog asks them before it shows the calendar;
|
|
1221
|
-
the WhatsApp booking chat asks the same ones.
|
|
1222
|
-
prospect taps
|
|
1223
|
-
|
|
1221
|
+
the WhatsApp booking chat asks the same ones. A question is either a list of
|
|
1222
|
+
choices the prospect taps (which language, what kind of firm) or a short typed
|
|
1223
|
+
answer (`type: "text"`: their NGO's name, their biggest challenge), so the right
|
|
1224
|
+
person on your team takes the call.
|
|
1224
1225
|
|
|
1225
1226
|
```ts
|
|
1226
1227
|
await updateBookingSettings({
|
|
1227
1228
|
questions: [
|
|
1228
1229
|
{ id: "profession", label: "What best describes you?", options: ["CA", "CS", "Tax consultant", "Other"] },
|
|
1229
1230
|
{ id: "language", label: "Which language would you like the demo in?", options: ["English", "Hindi", "Marathi"] },
|
|
1231
|
+
{ id: "ngo", label: "Your organisation's name", type: "text" },
|
|
1232
|
+
{ id: "challenge", label: "Your biggest challenge", type: "text", required: false },
|
|
1230
1233
|
],
|
|
1231
1234
|
});
|
|
1232
1235
|
|
|
@@ -1234,12 +1237,17 @@ const demos = await listBookings();
|
|
|
1234
1237
|
demos[0].answers; // [{ id: "language", question: "Which language…", answer: "Hindi" }, …]
|
|
1235
1238
|
```
|
|
1236
1239
|
|
|
1237
|
-
- Up to 5 questions
|
|
1240
|
+
- Up to 5 questions. A choice question has 2–9 choices (no `type` = choice); a `"text"`
|
|
1241
|
+
question has no `options` and takes up to 300 characters, whitespace collapsed.
|
|
1242
|
+
`required: false` lets a prospect skip one.
|
|
1243
|
+
- A typed answer is on the Google Calendar event and in `listBookings()` (`type: "text"`),
|
|
1244
|
+
but not in the WhatsApp owner alert, which stays one short line.
|
|
1238
1245
|
- Send the whole list to change it; `[]` asks nothing. Left out, it is kept.
|
|
1239
1246
|
- Keep a question's `id` when you reword it, so earlier answers still line up.
|
|
1240
1247
|
- The answers are also on the Google Calendar event and in the WhatsApp alert.
|
|
1241
1248
|
- The dialog needs a `glitchgrab` version newer than 1.57 on the site. An older one
|
|
1242
|
-
still books, without asking
|
|
1249
|
+
still books, without asking — and it skips typed questions, which need the release that
|
|
1250
|
+
added `type: "text"`.
|
|
1243
1251
|
|
|
1244
1252
|
### Trying new questions before prospects see them
|
|
1245
1253
|
|
package/dist/index.d.mts
CHANGED
|
@@ -128,6 +128,43 @@ declare function FeedbackButton({ position, label, className, children, }: Feedb
|
|
|
128
128
|
}) => ReactNode;
|
|
129
129
|
}): react_jsx_runtime.JSX.Element | null;
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Create GitHub issues from a recorded call, inside the host app (#765).
|
|
133
|
+
*
|
|
134
|
+
* The team's admin presses "Create issue" on a call; this sheet reads the call,
|
|
135
|
+
* drafts one issue per thing that was asked for, lets the admin correct a draft
|
|
136
|
+
* in plain words ("attendance here means WhatsApp check-in"), and files the
|
|
137
|
+
* ones they keep. It is the same flow as "get summary + issues" on the Glitchgrab
|
|
138
|
+
* call page; nothing is filed until a person presses the button.
|
|
139
|
+
*
|
|
140
|
+
* The browser never holds the project's server key. `getToken` asks the host's
|
|
141
|
+
* OWN server, which calls `createCallIssueSession(callId)` from
|
|
142
|
+
* `glitchgrab/server` and returns the one-call token. A token that has expired
|
|
143
|
+
* is replaced once, silently.
|
|
144
|
+
*
|
|
145
|
+
* Styled inline, like the report and booking dialogs: it renders inside
|
|
146
|
+
* someone else's stylesheet and must neither inherit from it nor fight it.
|
|
147
|
+
*/
|
|
148
|
+
interface CallIssueFiled {
|
|
149
|
+
id: string;
|
|
150
|
+
title: string;
|
|
151
|
+
number: number;
|
|
152
|
+
url: string;
|
|
153
|
+
}
|
|
154
|
+
interface GlitchgrabCallIssueProps {
|
|
155
|
+
/** The call: `FollowUpCall.id`. */
|
|
156
|
+
callId: string;
|
|
157
|
+
open: boolean;
|
|
158
|
+
onClose: () => void;
|
|
159
|
+
/** Ask your server for a fresh token — it calls `createCallIssueSession(callId)`. */
|
|
160
|
+
getToken: (callId: string) => Promise<string>;
|
|
161
|
+
/** Override the API host. Default `https://glitchgrab.dev`. */
|
|
162
|
+
baseUrl?: string;
|
|
163
|
+
/** Called once with every issue the admin just filed. */
|
|
164
|
+
onFiled?: (issues: CallIssueFiled[]) => void;
|
|
165
|
+
}
|
|
166
|
+
declare function GlitchgrabCallIssue({ callId, open, onClose, getToken, baseUrl, onFiled }: GlitchgrabCallIssueProps): react_jsx_runtime.JSX.Element | null;
|
|
167
|
+
|
|
131
168
|
interface ErrorBoundaryProps {
|
|
132
169
|
token: string;
|
|
133
170
|
baseUrl?: string;
|
|
@@ -502,4 +539,4 @@ declare function computeSignature(params: {
|
|
|
502
539
|
declare function shouldSkipDuplicate(signature: string, windowMs?: number, now?: number): boolean;
|
|
503
540
|
declare function clearDedupCache(): void;
|
|
504
541
|
|
|
505
|
-
export { BookDemoButton, BookedDemo, BookingDialog, Breadcrumb, BreadcrumbType, CaptureErrorOptions, CapturedContext, DeviceInfo, FeedbackButton, FeedbackButtonProps, FeedbackPayload, type FeedbackQuery, FeedbackResult, GLITCHGRAB_SHORTCUT, GLITCHGRAB_SHORTCUT_MAC, type GlitchgrabComment, GlitchgrabErrorBoundary, GlitchgrabFeedback, GlitchgrabProvider, GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabReportThread, GlitchgrabSession, LeadInput, LeadResult, ReportButton, ReportButtonProps, ReportPayload, ReportResult, UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, captureError, clearAppContext, clearBreadcrumbs, clearDedupCache, computeSignature, enhanceText, fetchGlitchgrabFeedback, fetchGlitchgrabReportThread, fetchGlitchgrabReports, getAppContext, getBreadcrumbs, getShortcutLabel, initBreadcrumbs, matchesShortcut, postGlitchgrabReportComment, sanitizeUrl, sendFeedback, sendLead, sendReport, setContext, setContexts, shouldSkipDuplicate, useGlitchgrab, useGlitchgrabActions, useGlitchgrabFeedback, useGlitchgrabReportThread, useGlitchgrabReports };
|
|
542
|
+
export { BookDemoButton, BookedDemo, BookingDialog, Breadcrumb, BreadcrumbType, type CallIssueFiled, CaptureErrorOptions, CapturedContext, DeviceInfo, FeedbackButton, FeedbackButtonProps, FeedbackPayload, type FeedbackQuery, FeedbackResult, GLITCHGRAB_SHORTCUT, GLITCHGRAB_SHORTCUT_MAC, GlitchgrabCallIssue, type GlitchgrabCallIssueProps, type GlitchgrabComment, GlitchgrabErrorBoundary, GlitchgrabFeedback, GlitchgrabProvider, GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabReportThread, GlitchgrabSession, LeadInput, LeadResult, ReportButton, ReportButtonProps, ReportPayload, ReportResult, UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, captureError, clearAppContext, clearBreadcrumbs, clearDedupCache, computeSignature, enhanceText, fetchGlitchgrabFeedback, fetchGlitchgrabReportThread, fetchGlitchgrabReports, getAppContext, getBreadcrumbs, getShortcutLabel, initBreadcrumbs, matchesShortcut, postGlitchgrabReportComment, sanitizeUrl, sendFeedback, sendLead, sendReport, setContext, setContexts, shouldSkipDuplicate, useGlitchgrab, useGlitchgrabActions, useGlitchgrabFeedback, useGlitchgrabReportThread, useGlitchgrabReports };
|
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,43 @@ declare function FeedbackButton({ position, label, className, children, }: Feedb
|
|
|
128
128
|
}) => ReactNode;
|
|
129
129
|
}): react_jsx_runtime.JSX.Element | null;
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Create GitHub issues from a recorded call, inside the host app (#765).
|
|
133
|
+
*
|
|
134
|
+
* The team's admin presses "Create issue" on a call; this sheet reads the call,
|
|
135
|
+
* drafts one issue per thing that was asked for, lets the admin correct a draft
|
|
136
|
+
* in plain words ("attendance here means WhatsApp check-in"), and files the
|
|
137
|
+
* ones they keep. It is the same flow as "get summary + issues" on the Glitchgrab
|
|
138
|
+
* call page; nothing is filed until a person presses the button.
|
|
139
|
+
*
|
|
140
|
+
* The browser never holds the project's server key. `getToken` asks the host's
|
|
141
|
+
* OWN server, which calls `createCallIssueSession(callId)` from
|
|
142
|
+
* `glitchgrab/server` and returns the one-call token. A token that has expired
|
|
143
|
+
* is replaced once, silently.
|
|
144
|
+
*
|
|
145
|
+
* Styled inline, like the report and booking dialogs: it renders inside
|
|
146
|
+
* someone else's stylesheet and must neither inherit from it nor fight it.
|
|
147
|
+
*/
|
|
148
|
+
interface CallIssueFiled {
|
|
149
|
+
id: string;
|
|
150
|
+
title: string;
|
|
151
|
+
number: number;
|
|
152
|
+
url: string;
|
|
153
|
+
}
|
|
154
|
+
interface GlitchgrabCallIssueProps {
|
|
155
|
+
/** The call: `FollowUpCall.id`. */
|
|
156
|
+
callId: string;
|
|
157
|
+
open: boolean;
|
|
158
|
+
onClose: () => void;
|
|
159
|
+
/** Ask your server for a fresh token — it calls `createCallIssueSession(callId)`. */
|
|
160
|
+
getToken: (callId: string) => Promise<string>;
|
|
161
|
+
/** Override the API host. Default `https://glitchgrab.dev`. */
|
|
162
|
+
baseUrl?: string;
|
|
163
|
+
/** Called once with every issue the admin just filed. */
|
|
164
|
+
onFiled?: (issues: CallIssueFiled[]) => void;
|
|
165
|
+
}
|
|
166
|
+
declare function GlitchgrabCallIssue({ callId, open, onClose, getToken, baseUrl, onFiled }: GlitchgrabCallIssueProps): react_jsx_runtime.JSX.Element | null;
|
|
167
|
+
|
|
131
168
|
interface ErrorBoundaryProps {
|
|
132
169
|
token: string;
|
|
133
170
|
baseUrl?: string;
|
|
@@ -502,4 +539,4 @@ declare function computeSignature(params: {
|
|
|
502
539
|
declare function shouldSkipDuplicate(signature: string, windowMs?: number, now?: number): boolean;
|
|
503
540
|
declare function clearDedupCache(): void;
|
|
504
541
|
|
|
505
|
-
export { BookDemoButton, BookedDemo, BookingDialog, Breadcrumb, BreadcrumbType, CaptureErrorOptions, CapturedContext, DeviceInfo, FeedbackButton, FeedbackButtonProps, FeedbackPayload, type FeedbackQuery, FeedbackResult, GLITCHGRAB_SHORTCUT, GLITCHGRAB_SHORTCUT_MAC, type GlitchgrabComment, GlitchgrabErrorBoundary, GlitchgrabFeedback, GlitchgrabProvider, GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabReportThread, GlitchgrabSession, LeadInput, LeadResult, ReportButton, ReportButtonProps, ReportPayload, ReportResult, UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, captureError, clearAppContext, clearBreadcrumbs, clearDedupCache, computeSignature, enhanceText, fetchGlitchgrabFeedback, fetchGlitchgrabReportThread, fetchGlitchgrabReports, getAppContext, getBreadcrumbs, getShortcutLabel, initBreadcrumbs, matchesShortcut, postGlitchgrabReportComment, sanitizeUrl, sendFeedback, sendLead, sendReport, setContext, setContexts, shouldSkipDuplicate, useGlitchgrab, useGlitchgrabActions, useGlitchgrabFeedback, useGlitchgrabReportThread, useGlitchgrabReports };
|
|
542
|
+
export { BookDemoButton, BookedDemo, BookingDialog, Breadcrumb, BreadcrumbType, type CallIssueFiled, CaptureErrorOptions, CapturedContext, DeviceInfo, FeedbackButton, FeedbackButtonProps, FeedbackPayload, type FeedbackQuery, FeedbackResult, GLITCHGRAB_SHORTCUT, GLITCHGRAB_SHORTCUT_MAC, GlitchgrabCallIssue, type GlitchgrabCallIssueProps, type GlitchgrabComment, GlitchgrabErrorBoundary, GlitchgrabFeedback, GlitchgrabProvider, GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabReportThread, GlitchgrabSession, LeadInput, LeadResult, ReportButton, ReportButtonProps, ReportPayload, ReportResult, UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, captureError, clearAppContext, clearBreadcrumbs, clearDedupCache, computeSignature, enhanceText, fetchGlitchgrabFeedback, fetchGlitchgrabReportThread, fetchGlitchgrabReports, getAppContext, getBreadcrumbs, getShortcutLabel, initBreadcrumbs, matchesShortcut, postGlitchgrabReportComment, sanitizeUrl, sendFeedback, sendLead, sendReport, setContext, setContexts, shouldSkipDuplicate, useGlitchgrab, useGlitchgrabActions, useGlitchgrabFeedback, useGlitchgrabReportThread, useGlitchgrabReports };
|