glitchgrab 1.63.1 → 1.65.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 +36 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +43 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -10
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +281 -16
- package/dist/server.d.ts +281 -16
- package/dist/server.js +175 -11
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +167 -11
- package/dist/server.mjs.map +1 -1
- package/dist/{types-Dp5Sh_hd.d.mts → types-Dw587jLi.d.mts} +5 -1
- package/dist/{types-Dp5Sh_hd.d.ts → types-Dw587jLi.d.ts} +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -401,6 +401,42 @@ 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 {
|
|
410
|
+
submitPhoneKyc, enableCalling, getPhoneLine, addLineCaller, placeCall, registerWebhook,
|
|
411
|
+
addRingNumber, listRingNumbers, testRingNumber, removeLineCaller,
|
|
412
|
+
} from "glitchgrab/server";
|
|
413
|
+
|
|
414
|
+
// once, at deploy: get call.* and phone.* events
|
|
415
|
+
await registerWebhook({ url: "https://you.com/glitchgrab", events: ["phone.kyc_status", "phone.line_ready", "call.completed"] });
|
|
416
|
+
|
|
417
|
+
// the firm uploads its certificates (PDF/JPG/PNG, < 4 MB together)
|
|
418
|
+
await submitPhoneKyc({ ownerId: firm.id, businessName, email, addressLine1, city, state, postalCode, registrationCertificate, gstCertificate });
|
|
419
|
+
// the firm agrees to the monthly charge — nothing is bought without this
|
|
420
|
+
await enableCalling({ ownerId: firm.id, agreedBy: owner.email, areaCode: "20" });
|
|
421
|
+
// KYC accepted → Glitchgrab rents the number → phone.line_ready
|
|
422
|
+
|
|
423
|
+
const status = await getPhoneLine({ ownerId: firm.id }); // { line, request: { kycStatus, kycReason, enabled, buyState } }
|
|
424
|
+
await addLineCaller({ email: staff.email, name: staff.name, ownerId: firm.id });
|
|
425
|
+
// everything about one person on a line takes { ownerId } as its last argument
|
|
426
|
+
await addRingNumber({ email: staff.email }, { phone: staff.phone }, { ownerId: firm.id }); // test-rings from the firm's number
|
|
427
|
+
await listRingNumbers({ email: staff.email }, { ownerId: firm.id });
|
|
428
|
+
await testRingNumber(numberId, { ownerId: firm.id }); // retry a failed test ring
|
|
429
|
+
await removeLineCaller(staff.email, { ownerId: firm.id }); // only this firm's seat
|
|
430
|
+
const r = await placeCall({
|
|
431
|
+
operator: { email: staff.email },
|
|
432
|
+
to: client.phone,
|
|
433
|
+
ownerId: firm.id,
|
|
434
|
+
refKey: client.id, // comes back on every call.* webhook
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
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 (fresh signed links; the webhook carries none).
|
|
439
|
+
|
|
404
440
|
### Call another number, and see who missed it
|
|
405
441
|
|
|
406
442
|
`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-
|
|
3
|
-
export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-
|
|
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-
|
|
3
|
-
export { a as BookingDialogOptions, G as GlitchgrabConfig, m as ReportSeverity, n as ReportType, o as RuntimeInfo } from './types-
|
|
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)(
|
|
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
|
}
|