import { Configuration } from './configuration'; import { Observable } from './observable'; import { StackTrace } from './tracekit'; export interface ErrorMessage { startTime: number; message: string; context: { error: ErrorContext; http?: HttpContext; }; } export interface ErrorContext { kind?: string; stack?: string; origin: ErrorOrigin; } export interface HttpContext { url: string; status_code: number; method: string; } export declare enum ErrorOrigin { AGENT = "agent", CONSOLE = "console", NETWORK = "network", SOURCE = "source", LOGGER = "logger" } export declare type ErrorObservable = Observable; export declare function startErrorCollection(configuration: Configuration): ErrorObservable; export declare function filterErrors(configuration: Configuration, errorObservable: Observable): Observable; export declare function startConsoleTracking(errorObservable: ErrorObservable): void; export declare function stopConsoleTracking(): void; export declare function startRuntimeErrorTracking(errorObservable: ErrorObservable): void; export declare function stopRuntimeErrorTracking(): void; export declare function formatRuntimeError(stackTrace: StackTrace, errorObject: any): { message: string; context: { error: { stack: string; kind: string | undefined; origin: ErrorOrigin; }; }; startTime: number; }; export declare function toStackTraceString(stack: StackTrace): string; export declare function trackNetworkError(configuration: Configuration, errorObservable: ErrorObservable): { stop(): void; }; export declare function isRejected(request: { status: number; responseType?: string; }): boolean; export declare function isServerError(request: { status: number; }): boolean;