import { W as WidgetConfig, T as Telemetry, R as ReportCategory, a as ReportPriority, b as ReporterReport } from './types-C4WW_xwF.js'; export { C as ConsoleBreadcrumb, E as ErrorBreadcrumb, L as Locale, N as NavBreadcrumb, c as NetworkBreadcrumb, d as ReporterComment, e as ReporterImage, S as SnapshotConfig } from './types-C4WW_xwF.js'; declare class TelemetryCollector { private errors; private console; private network; private nav; private scrubFields; private captureBodies; private uninstallers; constructor(cfg: WidgetConfig); private push; install(): void; uninstall(): void; private installErrors; private installConsole; private recordNetwork; private shouldCaptureBody; private scrubRawBody; private installFetch; private installXHR; private installNav; private safe; /** Snapshot the buffers, trimmed to the total byte cap (drops oldest first). */ snapshot(): Telemetry; } interface ReportInput { title: string; description?: string; reporterName?: string; reporterEmail?: string; /** * What kind of problem this is. Worth asking the person filing it — they're * the only one who knows — and it's what makes triage possible later. * Anything the server doesn't recognise is filed as "other" rather than * rejected, so an outdated widget never loses a report. */ category?: ReportCategory; /** * Deliberately NOT asked of the reporter: everyone marks their own problem * urgent. It's here for automated callers that genuinely know (a failed sync * is not a cosmetic issue); a human form should leave it out and let triage * decide. */ priority?: ReportPriority; /** Which part of the product this belongs to. Free text — see defaultArea. */ area?: string; images?: File[]; } interface IngestResult { id: string; seq: number; folio: string; images: number; token: string; } /** * submit POSTs a report to the public ingest endpoint (Sentry-DSN model: the * write-only key rides in the client). Attaches page context, up to 5 images, * the telemetry breadcrumbs and the opt-in snapshot as JSON fields. Extra * fields the backend doesn't yet read (telemetry/snapshot/context) are simply * ignored server-side until the ingest extension lands — forward-compatible. */ declare function submit(cfg: WidgetConfig, input: ReportInput, telemetry?: TelemetryCollector): Promise; interface StoredReport { id: string; folio: string; title: string; token: string; createdAt: number; /** unix seconds of the last time the reporter viewed this thread (for unread) */ lastSeenAt?: number; } interface Reporter { /** send a report; page context + telemetry + identity are attached automatically */ submit(input: ReportInput): Promise; /** current telemetry snapshot (for a "what will be sent" preview) */ telemetry(): ReturnType; /** reports this browser has filed (from stored per-report tokens) */ myReports(): StoredReport[]; /** the reporter's own view of one of their reports (status + thread) */ viewReport(id: string): Promise; /** reply to one of the reporter's reports */ reply(id: string, body: string, images?: File[]): Promise; /** total unread team replies across stored reports (one batched request) */ unreadCount(): Promise; /** mark a report's thread as seen (resets its unread count) */ markSeen(id: string): void; /** stop collecting and restore all patched globals */ destroy(): void; } /** * createReporter installs the passive telemetry collectors immediately and * returns a handle to submit reports and follow up on them. Headless core * shared by the React component and the vanilla fallback. */ declare function createReporter(cfg: WidgetConfig): Reporter; export { type IngestResult, ReportCategory, type ReportInput, ReportPriority, type Reporter, ReporterReport, type StoredReport, Telemetry, TelemetryCollector, WidgetConfig, createReporter, submit };