import { type SentryDsn } from "./dsn"; export interface CrashEventFrame { readonly filename: string; readonly function: string; } export interface BuildCrashEnvelopeInput { readonly eventId: string; readonly fingerprint: string; readonly errorName: string; readonly messageClass: string; readonly frames: readonly CrashEventFrame[]; readonly firstSeen: number; readonly lastSeen: number; readonly lifetimeCount: number; readonly release: string; readonly platform: string; readonly bunVersion: string; readonly dsn: SentryDsn; /** Upstream severity. Defaults to `fatal`; handled tool failures use `error`. */ readonly level?: "fatal" | "error"; } export type BuildCrashEnvelopeResult = { ok: true; body: string; eventId: string; } | { ok: false; reason: string; }; /** Create Sentry's required lowercase 128-bit event identifier. */ export declare function newSentryEventId(): string; /** Build the exact auth header used for the hand-rolled envelope POST. */ export declare function sentryAuthHeader(dsn: SentryDsn, clientVersion: string): string; /** * Build a three-line event envelope. Sanitization failures and oversize output * refuse the complete event: JSON must never be truncated into a new payload. */ export declare function buildCrashEnvelope(input: BuildCrashEnvelopeInput): BuildCrashEnvelopeResult;