export interface TrackerConfig { apiUrl: string; issueIngestUrl: string; apiKey: string; debug: boolean; autoCapture: boolean; captureNetworkErrors: boolean; captureJsErrors: boolean; captureSocketErrors: boolean; sessionTimeoutMs: number; maxActionBufferSize: number; allowNonErrorEvents: boolean; ignoredStatusCodes: number[]; ignoredUrls: string[]; captureRequestBody: boolean; captureResponseBody: boolean; redactKeys: string[]; redactUrlParams: string[]; propagateTraceHeaders: boolean; traceOrigins: string[]; traceHeaderName: string; enableSessionReplay: boolean; replayUsageCheckIntervalMs: number; replayFlushIntervalMs: number; replayMaxSegmentBytes: number; replayMaxSegmentEvents: number; replayMaskAllInputs: boolean; } export interface UserAction { action: string; timestamp: number; url: string; details?: Record; } export interface DeviceInfo { os_name: string; device_type: string; device_id: string; browser_name: string; browser_version: string; screen_width: number; screen_height: number; viewport_width: number; viewport_height: number; language: string; timezone: string; user_agent: string; } export interface NetworkStatus { online: boolean; connection_type?: string; downlink?: number; rtt?: number; save_data?: boolean; } export interface TrackerPayload { event_name: string; session_id: string; brand_id: number; data: Record; } export interface TrackerTraceContext { trace_id: string; span_id: string; traceparent: string; } export interface ReplayFlushResult { content_type: string; object_key: string; replay_session_id: string | null; segment_id: string; sequence_number: number; session_id: string; size_bytes: number; storage_driver: string; } export interface ReplayFinalizeResult { finalized_at: string; id: string; segment_count: number; session_id: string; status: string; total_size_bytes: number; } export type IgnoreRuleType = "page_url" | "api_endpoint" | "issue_type"; export type IgnoreRuleOperator = "contains" | "equals" | "starts_with" | "ends_with" | "regex"; export type IgnoreRuleScope = "tracking_issue" | "session_replay"; export interface IgnoreRuleTarget { value: string; api_method?: string; } export interface IgnoreRule { id: string; name: string; type: IgnoreRuleType; operator: IgnoreRuleOperator; targets: IgnoreRuleTarget[]; status: "active" | "inactive"; scope: IgnoreRuleScope; is_disabled?: boolean; } export interface TrackerPublicApi { init(brandId: string | number, config?: Partial): Promise; track(eventName: string, data?: Record): Promise; reportError(error: Error | string, context?: Record): Promise; addUserAction(action: string, details?: Record): void; identify(accountId: string, traits?: Record): void; clearIdentity(): void; getTraceHeaders(): Record; getSessionId(): string | null; getDeviceId(): string | null; flushReplay(reason?: string): Promise; finalizeReplay(reason?: string): Promise; reset(): void; }