glitchgrab 1.63.1 → 1.64.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
@@ -401,6 +401,34 @@ A caller your key added is rung only on phones they confirmed with press 1 — n
401
401
 
402
402
  `ringPhone` omitted = their Default. While a call is still `DIALING`, `lastCall.ringingPhone` is the phone ringing now; `ringingIndex` above 0 means a backup.
403
403
 
404
+ ### A line per customer, and calls without a follow-up
405
+
406
+ If your product sells calling to its own customers (each CA firm on PracticeStacks), each customer gets its own number, rented under its own KYC — set up entirely from your product:
407
+
408
+ ```ts
409
+ import { submitPhoneKyc, enableCalling, getPhoneLine, addLineCaller, placeCall, registerWebhook } from "glitchgrab/server";
410
+
411
+ // once, at deploy: get call.* and phone.* events
412
+ await registerWebhook({ url: "https://you.com/glitchgrab", events: ["phone.kyc_status", "phone.line_ready", "call.completed"] });
413
+
414
+ // the firm uploads its certificates (PDF/JPG/PNG, < 4 MB together)
415
+ await submitPhoneKyc({ ownerId: firm.id, businessName, email, addressLine1, city, state, postalCode, registrationCertificate, gstCertificate });
416
+ // the firm agrees to the monthly charge — nothing is bought without this
417
+ await enableCalling({ ownerId: firm.id, agreedBy: owner.email, areaCode: "20" });
418
+ // KYC accepted → Glitchgrab rents the number → phone.line_ready
419
+
420
+ const status = await getPhoneLine({ ownerId: firm.id }); // { line, request: { kycStatus, kycReason, enabled, buyState } }
421
+ await addLineCaller({ email: staff.email, name: staff.name, ownerId: firm.id });
422
+ const r = await placeCall({
423
+ operator: { email: staff.email },
424
+ to: client.phone,
425
+ ownerId: firm.id,
426
+ refKey: client.id, // comes back on every call.* webhook
427
+ });
428
+ ```
429
+
430
+ Check your own "may this person call" permission before `placeCall`; Glitchgrab only checks the line seat. Every `call.*` webhook (`call.started`, `call.answered`, `call.completed`, `call.recording_ready`, `call.summary_ready`) carries `refKey` and `ownerId`. `getCall(r.callId)` returns the recording.
431
+
404
432
  ### Call another number, and see who missed it
405
433
 
406
434
  `toPhone` rings a different number for one call — the follow-up's saved `phone` stays as it is, and it isn't checked against other follow-ups. (`phone` still rewrites the saved number.)
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-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';
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-Dw587jLi.mjs';
3
+ export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-Dw587jLi.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-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';
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-Dw587jLi.js';
3
+ export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-Dw587jLi.js';
4
4
  import * as React from 'react';
5
5
  import { ReactNode } from 'react';
6
6
 
package/dist/index.js CHANGED
@@ -5885,6 +5885,15 @@ var micErrorMessage = (err) => {
5885
5885
  return null;
5886
5886
  }
5887
5887
  };
5888
+ var SparkleIcon = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5889
+ "path",
5890
+ {
5891
+ d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
5892
+ stroke: color,
5893
+ strokeWidth: "1.5",
5894
+ strokeLinejoin: "round"
5895
+ }
5896
+ ) });
5888
5897
  function ReportDialog({
5889
5898
  report,
5890
5899
  sendFeedback: sendFeedback2,
@@ -6667,7 +6676,7 @@ function ReportDialog({
6667
6676
  );
6668
6677
  if (result) {
6669
6678
  setAddedToIssue(
6670
- duplicateOf && result.issueNumber === duplicateOf ? duplicateOf : result.status === "DUPLICATE" && result.issueNumber ? result.issueNumber : null
6679
+ duplicateOf && result.issueNumber === duplicateOf ? duplicateOf : (result.status === "DUPLICATE" || result.status === "GROUPED") && result.issueNumber ? result.issueNumber : null
6671
6680
  );
6672
6681
  setAddedAsRelated(!!duplicateOf && result.issueNumber === duplicateOf && attachKind === "related");
6673
6682
  const queued = result.status === "QUEUED" && !!result.message;
@@ -7362,6 +7371,38 @@ function ReportDialog({
7362
7371
  ]
7363
7372
  }
7364
7373
  ),
7374
+ step === 1 && assist && !assistUsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7375
+ "button",
7376
+ {
7377
+ type: "button",
7378
+ onClick: () => {
7379
+ setAssistNotice(null);
7380
+ setAssistOpen(true);
7381
+ },
7382
+ style: {
7383
+ display: "flex",
7384
+ alignItems: "center",
7385
+ justifyContent: "center",
7386
+ gap: "6px",
7387
+ width: "100%",
7388
+ marginBottom: "10px",
7389
+ padding: "10px",
7390
+ borderRadius: "8px",
7391
+ border: `1px solid ${t.accent}`,
7392
+ background: "transparent",
7393
+ color: t.accent,
7394
+ fontSize: "12px",
7395
+ fontWeight: 600,
7396
+ fontFamily: "inherit",
7397
+ cursor: "pointer"
7398
+ },
7399
+ title: "Answer a question or two and the assistant writes the report for you",
7400
+ children: [
7401
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SparkleIcon, { color: t.accent }),
7402
+ "Describe it with AI"
7403
+ ]
7404
+ }
7405
+ ),
7365
7406
  step === 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7366
7407
  "div",
7367
7408
  {
@@ -7524,15 +7565,7 @@ function ReportDialog({
7524
7565
  },
7525
7566
  title: "Answer a question or two and the assistant writes the report for you",
7526
7567
  children: [
7527
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7528
- "path",
7529
- {
7530
- d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3zM19 15l.75 2.25L22 18l-2.25.75L19 21l-.75-2.25L16 18l2.25-.75L19 15z",
7531
- stroke: t.accent,
7532
- strokeWidth: "1.5",
7533
- strokeLinejoin: "round"
7534
- }
7535
- ) }),
7568
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SparkleIcon, { color: t.accent }),
7536
7569
  "Describe it with AI"
7537
7570
  ]
7538
7571
  }