import { ErrorCode } from "./codes.js"; /** * RFC7807 serializable error shape. */ export type ProblemDetail = { code: ErrorCode; title: string; detail: string; status?: number; }; /** * SDK error class, RFC 7807 aligned. * The original cause is preserved via `Error.cause` but never serialized. */ export declare class AnalyticsError extends Error { readonly code: ErrorCode; readonly title: string; readonly detail: string; readonly status?: number; constructor(code: ErrorCode, title: string, detail: string, options?: { cause?: unknown; status?: number; }); /** * Wraps an unknown caught error into an AnalyticsError. * If already an AnalyticsError, returns it directly. */ static from(rawError: unknown, fallbackCode: ErrorCode): AnalyticsError; /** * Returns a plain object safe for logging and serialization. */ toJSON(): ProblemDetail; } //# sourceMappingURL=analytics-error.d.ts.map