glitchgrab 1.62.0 → 1.62.2

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
@@ -337,6 +337,51 @@ await dialFollowUp(owner.id, { operator: { email: "admin@you.in" } });
337
337
 
338
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
339
 
340
+ ### "Ring me on" — pick which phone rings
341
+
342
+ Each person on the line keeps a list of verified phones for your project (shown read-only in Glitchgrab under Calls → Phone lines → People): one Default, the rest backups. Lists are per project — your key never sees or changes another product's. If a phone isn't picked up, busy or rejected, the next backup rings by itself.
343
+
344
+ ```ts
345
+ import { getOperatorRingNumbers, dialFollowUp } from "glitchgrab/server";
346
+
347
+ const r = await getOperatorRingNumbers({ email: "admin@you.in" });
348
+ // r.numbers → [{ phone: "+9198…", label: "Work SIM", isDefault: true, order: 0 }, …]
349
+
350
+ const call = await dialFollowUp(owner.id, { operator: { email: "admin@you.in" }, ringPhone: picked.phone });
351
+ if (!call.ok) showError(call.code); // NOT_ON_LINE | NO_VERIFIED_NUMBER | RING_PHONE_NOT_YOURS
352
+ ```
353
+
354
+ Ring numbers are managed from your product, not in Glitchgrab (it shows them read-only):
355
+
356
+ ```ts
357
+ import { listRingNumbers, addRingNumber, updateRingNumber, removeRingNumber, testRingNumber } from "glitchgrab/server";
358
+
359
+ await addRingNumber({ email: "admin@you.in" }, { phone: "98765 43210", label: "Work SIM" }); // test ring goes out now
360
+ const list = await listRingNumbers({ email: "admin@you.in" }); // poll until numbers[i].verified; !ok → list.code
361
+ if (list.ok) await updateRingNumber(list.numbers[1].id, { makeDefault: true }); // or { move: "up" | "down" }, { label }
362
+ await removeRingNumber(id);
363
+ await testRingNumber(id); // ring again if they missed it
364
+ ```
365
+
366
+ A number is never rung for a call until whoever holds it presses 1 on the test ring, and the project owner is emailed every time one is verified — so a leaked server key adding its own phone does not go unnoticed.
367
+
368
+ ### Add a caller from your product
369
+
370
+ Someone not on the line yet (a new super admin) can be put on it by your key, so nobody opens Glitchgrab. Repeating it with the same email returns the same caller (`created: false`).
371
+
372
+ ```ts
373
+ import { addLineCaller, removeLineCaller, addRingNumber } from "glitchgrab/server";
374
+
375
+ const r = await addLineCaller({ email: "admin@you.in", name: "Vivek" });
376
+ if (!r.ok) showError(r.code); // NO_LINE | CALLERS_OFF | CALLER_CAP
377
+ await addRingNumber({ email: "admin@you.in" }, { phone: "98765 43210" }); // they press 1, then they can call
378
+ await removeLineCaller("admin@you.in"); // when they leave your admin team
379
+ ```
380
+
381
+ A caller your key added is rung only on phones they confirmed with press 1 — never an account number — so `dialFollowUp` answers `NO_VERIFIED_NUMBER` until they do. At most 10 per line; the line's owner is emailed for each one and can switch this off on the line in Glitchgrab (`CALLERS_OFF`).
382
+
383
+ `ringPhone` omitted = their Default. While a call is still `DIALING`, `lastCall.ringingPhone` is the phone ringing now; `ringingIndex` above 0 means a backup.
384
+
340
385
  ## What keyboard shortcuts are available?
341
386
 
342
387
  Once `GlitchgrabProvider` is mounted, these shortcuts work globally:
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { h as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, B as BookedDemo, F as FeedbackButtonProps, i as GlitchgrabSession, C as CaptureErrorOptions, g as GlitchgrabFeedback, c as BreadcrumbType, b as Breadcrumb, d as CapturedContext, D as DeviceInfo, e as FeedbackPayload, f as FeedbackResult, L as LeadInput, j as LeadResult, k as ReportPayload, l as ReportResult } from './types-BlMF6wzX.mjs';
3
- export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-BlMF6wzX.mjs';
2
+ import { h as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, B as BookedDemo, F as FeedbackButtonProps, i as GlitchgrabSession, C as CaptureErrorOptions, g as GlitchgrabFeedback, c as BreadcrumbType, b as Breadcrumb, d as CapturedContext, D as DeviceInfo, e as FeedbackPayload, f as FeedbackResult, L as LeadInput, j as LeadResult, k as ReportPayload, l as ReportResult } from './types-Dp5Sh_hd.mjs';
3
+ export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-Dp5Sh_hd.mjs';
4
4
  import * as React from 'react';
5
5
  import { ReactNode } from 'react';
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { h as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, B as BookedDemo, F as FeedbackButtonProps, i as GlitchgrabSession, C as CaptureErrorOptions, g as GlitchgrabFeedback, c as BreadcrumbType, b as Breadcrumb, d as CapturedContext, D as DeviceInfo, e as FeedbackPayload, f as FeedbackResult, L as LeadInput, j as LeadResult, k as ReportPayload, l as ReportResult } from './types-BlMF6wzX.js';
3
- export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-BlMF6wzX.js';
2
+ import { h as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, B as BookedDemo, F as FeedbackButtonProps, i as GlitchgrabSession, C as CaptureErrorOptions, g as GlitchgrabFeedback, c as BreadcrumbType, b as Breadcrumb, d as CapturedContext, D as DeviceInfo, e as FeedbackPayload, f as FeedbackResult, L as LeadInput, j as LeadResult, k as ReportPayload, l as ReportResult } from './types-Dp5Sh_hd.js';
3
+ export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-Dp5Sh_hd.js';
4
4
  import * as React from 'react';
5
5
  import { ReactNode } from 'react';
6
6