glitchgrab 1.59.0 → 1.60.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/dist/server.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as ReportType, k as ReportSeverity, j as ReportResult } from './types-BpTLWJ1y.mjs';
1
+ import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-BlMF6wzX.mjs';
2
2
  import 'react';
3
3
 
4
4
  /** Who to attribute the report to. A server has no signed-in user, so this is the job or service. */
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as ReportType, k as ReportSeverity, j as ReportResult } from './types-BpTLWJ1y.js';
1
+ import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-BlMF6wzX.js';
2
2
  import 'react';
3
3
 
4
4
  /** Who to attribute the report to. A server has no signed-in user, so this is the job or service. */
@@ -239,6 +239,32 @@ interface FeedbackButtonProps {
239
239
  /** Shown after a successful submit */
240
240
  thanksMessage?: string;
241
241
  }
242
+ /** A demo booking the visitor just confirmed in the booking dialog. */
243
+ interface BookedDemo {
244
+ /** Glitchgrab's id for the booking. Verify it server-side before trusting it. */
245
+ bookingId: string;
246
+ /** ISO start time of the call. */
247
+ startsAt: string;
248
+ name: string;
249
+ email: string;
250
+ phone: string;
251
+ meetUrl: string | null;
252
+ }
253
+ /** What a host can pass when it opens the booking dialog itself. */
254
+ interface BookingDialogOptions {
255
+ /**
256
+ * A short line shown above the dialog's title, in the host's words — why
257
+ * the visitor is booking right now ("Before we open the demo, we book your
258
+ * follow-up call").
259
+ */
260
+ intro?: string;
261
+ /**
262
+ * Called once, the moment a booking is confirmed — after the phone code
263
+ * when one is asked. Never called in preview. The details come from the
264
+ * browser, so treat them as a claim: check `bookingId` on your server.
265
+ */
266
+ onBooked?: (booking: BookedDemo) => void;
267
+ }
242
268
  interface UseGlitchgrabReturn {
243
269
  /** Report a bug programmatically */
244
270
  reportBug: (description: string, metadata?: Record<string, string>) => Promise<ReportResult | null>;
@@ -286,7 +312,7 @@ interface UseGlitchgrabReturn {
286
312
  * creates a Meet on it — so this is only useful for projects whose owner has
287
313
  * connected a calendar and enabled booking in Glitchgrab.
288
314
  */
289
- openBookingDialog: () => void;
315
+ openBookingDialog: (options?: BookingDialogOptions) => void;
290
316
  /**
291
317
  * Open the booking dialog with the project's DRAFT questions — what
292
318
  * prospects will see once the draft is published (see `updateBookingSettings`
@@ -313,4 +339,4 @@ interface UseGlitchgrabReturn {
313
339
  baseUrl: string;
314
340
  }
315
341
 
316
- export type { Breadcrumb as B, CaptureErrorOptions as C, DeviceInfo as D, FeedbackButtonProps as F, GlitchgrabConfig as G, LeadInput as L, ReportButtonProps as R, UseGlitchgrabReturn as U, BreadcrumbType as a, CapturedContext as b, FeedbackPayload as c, FeedbackResult as d, GlitchgrabFeedback as e, GlitchgrabProviderProps as f, GlitchgrabSession as g, LeadResult as h, ReportPayload as i, ReportResult as j, ReportSeverity as k, ReportType as l, RuntimeInfo as m };
342
+ export type { BookedDemo as B, CaptureErrorOptions as C, DeviceInfo as D, FeedbackButtonProps as F, GlitchgrabConfig as G, LeadInput as L, ReportButtonProps as R, UseGlitchgrabReturn as U, BookingDialogOptions as a, Breadcrumb as b, BreadcrumbType as c, CapturedContext as d, FeedbackPayload as e, FeedbackResult as f, GlitchgrabFeedback as g, GlitchgrabProviderProps as h, GlitchgrabSession as i, LeadResult as j, ReportPayload as k, ReportResult as l, ReportSeverity as m, ReportType as n, RuntimeInfo as o };
@@ -239,6 +239,32 @@ interface FeedbackButtonProps {
239
239
  /** Shown after a successful submit */
240
240
  thanksMessage?: string;
241
241
  }
242
+ /** A demo booking the visitor just confirmed in the booking dialog. */
243
+ interface BookedDemo {
244
+ /** Glitchgrab's id for the booking. Verify it server-side before trusting it. */
245
+ bookingId: string;
246
+ /** ISO start time of the call. */
247
+ startsAt: string;
248
+ name: string;
249
+ email: string;
250
+ phone: string;
251
+ meetUrl: string | null;
252
+ }
253
+ /** What a host can pass when it opens the booking dialog itself. */
254
+ interface BookingDialogOptions {
255
+ /**
256
+ * A short line shown above the dialog's title, in the host's words — why
257
+ * the visitor is booking right now ("Before we open the demo, we book your
258
+ * follow-up call").
259
+ */
260
+ intro?: string;
261
+ /**
262
+ * Called once, the moment a booking is confirmed — after the phone code
263
+ * when one is asked. Never called in preview. The details come from the
264
+ * browser, so treat them as a claim: check `bookingId` on your server.
265
+ */
266
+ onBooked?: (booking: BookedDemo) => void;
267
+ }
242
268
  interface UseGlitchgrabReturn {
243
269
  /** Report a bug programmatically */
244
270
  reportBug: (description: string, metadata?: Record<string, string>) => Promise<ReportResult | null>;
@@ -286,7 +312,7 @@ interface UseGlitchgrabReturn {
286
312
  * creates a Meet on it — so this is only useful for projects whose owner has
287
313
  * connected a calendar and enabled booking in Glitchgrab.
288
314
  */
289
- openBookingDialog: () => void;
315
+ openBookingDialog: (options?: BookingDialogOptions) => void;
290
316
  /**
291
317
  * Open the booking dialog with the project's DRAFT questions — what
292
318
  * prospects will see once the draft is published (see `updateBookingSettings`
@@ -313,4 +339,4 @@ interface UseGlitchgrabReturn {
313
339
  baseUrl: string;
314
340
  }
315
341
 
316
- export type { Breadcrumb as B, CaptureErrorOptions as C, DeviceInfo as D, FeedbackButtonProps as F, GlitchgrabConfig as G, LeadInput as L, ReportButtonProps as R, UseGlitchgrabReturn as U, BreadcrumbType as a, CapturedContext as b, FeedbackPayload as c, FeedbackResult as d, GlitchgrabFeedback as e, GlitchgrabProviderProps as f, GlitchgrabSession as g, LeadResult as h, ReportPayload as i, ReportResult as j, ReportSeverity as k, ReportType as l, RuntimeInfo as m };
342
+ export type { BookedDemo as B, CaptureErrorOptions as C, DeviceInfo as D, FeedbackButtonProps as F, GlitchgrabConfig as G, LeadInput as L, ReportButtonProps as R, UseGlitchgrabReturn as U, BookingDialogOptions as a, Breadcrumb as b, BreadcrumbType as c, CapturedContext as d, FeedbackPayload as e, FeedbackResult as f, GlitchgrabFeedback as g, GlitchgrabProviderProps as h, GlitchgrabSession as i, LeadResult as j, ReportPayload as k, ReportResult as l, ReportSeverity as m, ReportType as n, RuntimeInfo as o };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "glitchgrab",
3
3
  "license": "SEE LICENSE IN LICENSE",
4
- "version": "1.59.0",
4
+ "version": "1.60.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",