export type ReportType = "bug" | "feedback"; /** The fields an app can fill. The service accepts more. */ export interface Report { type: ReportType; message: string; title?: string; app?: { version?: string; /** The build number, where the platform has one distinct from the version. */ build?: string; channel?: string; /** Random per install, not per person. What rate limits are counted against. */ installId?: string; locale?: string; }; device?: { platform?: string; osVersion?: string; /** A crash only simulators produce is worth telling apart from a real one. */ isEmulator?: boolean; screen?: { width: number; height: number; scale: number; }; timezone?: string; }; runtime?: { engine?: string; chromeVersion?: string; electronVersion?: string; reactNativeVersion?: string; expoVersion?: string; userAgent?: string; }; context?: { route?: string; serverVersion?: string; connected?: boolean; voiceActive?: boolean; online?: boolean; networkType?: string; /** "It broke twenty minutes in" and "it broke on launch" are different bugs. */ sessionUptimeSec?: number; }; /** The tail of the app's own log, where it keeps one. */ logs?: string[]; extra?: { embeddedServer?: boolean; embeddedServerVersion?: string; }; } /** * What an app knows about itself when somebody opens the form. Passed in rather than read * here: every one of these comes from somewhere that needs a running app. */ export interface Diagnostics { version?: string | null; build?: string | null; channel?: string | null; installId?: string | null; locale?: string | null; platform?: string | null; /** A number on some platforms: Android's API level arrives as one. */ osVersion?: string | number | null; isEmulator?: boolean | null; screen?: { width: number; height: number; scale: number; } | null; timezone?: string | null; engine?: string | null; chromeVersion?: string | null; electronVersion?: string | null; reactNativeVersion?: string | null; expoVersion?: string | null; userAgent?: string | null; route?: string | null; serverVersion?: string | null; connected?: boolean | null; voiceActive?: boolean | null; online?: boolean | null; networkType?: string | null; sessionUptimeSec?: number | null; /** Whether this app is running the server it is connected to. */ embeddedServer?: boolean | null; /** The version of that embedded server, which is not the app's. */ embeddedServerVersion?: string | null; logs?: string[]; } /** * The service truncates, but an app should not send a novel either. Generous rather than * tight: cutting somebody off at a tweet is how you get "it broke". */ export declare const MESSAGE_MAX = 8000; export declare const TITLE_MAX = 120; /** * Assemble what gets sent: `type` and `message` always, and a diagnostic only if it is * known. An empty `device` claims the app collects none, which is wronger than leaving it off. */ export declare function buildReport(type: ReportType, input: { message: string; title?: string; }, diagnostics?: Diagnostics): Report; export declare function describeAttached(report: Report): { label: string; value: string; }[];