import type { Package } from '@sentry/core'; import type { TurboModule } from 'react-native'; import type { UnsafeObject } from './utils/rnlibrariesinterface'; export interface Spec extends TurboModule { addListener: (eventType: string) => void; removeListeners: (id: number) => void; getNewScreenTimeToDisplay(): Promise; addBreadcrumb(breadcrumb: UnsafeObject): void; captureEnvelope(bytes: string, options: { hardCrashed: boolean; }): Promise; captureScreenshot(): Promise; clearBreadcrumbs(): void; crash(): void; closeNativeSdk(): Promise; disableNativeFramesTracking(): void; fetchNativeRelease(): Promise; fetchNativeSdkInfo(): Promise; fetchNativeDeviceContexts(): Promise; fetchNativeLogAttributes(): Promise; fetchNativeAppStart(): Promise; fetchNativeFrames(): Promise; initNativeSdk(options: UnsafeObject): Promise; setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void; setContext(key: string, value: UnsafeObject | null): void; setExtra(key: string, value: string): void; setTag(key: string, value: string): void; enableNativeFramesTracking(): void; fetchModules(): Promise; fetchViewHierarchy(): Promise; startProfiling(platformProfilers: boolean): { started?: boolean; error?: string; }; stopProfiling(): { profile?: string; nativeProfile?: UnsafeObject; androidProfile?: UnsafeObject; error?: string; }; fetchNativePackageName(): string | undefined | null; fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null; initNativeReactNavigationNewFrameTracking(): Promise; captureReplay(isHardCrash: boolean): Promise; getCurrentReplayId(): string | undefined | null; crashedLastRun(): Promise; getDataFromUri(uri: string): Promise; popTimeToDisplayFor(key: string): Promise; setActiveSpanId(spanId: string): boolean; encodeToBase64(data: number[]): Promise; } export type NativeStackFrame = { platform: string; /** * The instruction address of this frame. * Formatted as hex with 0x prefix. */ instruction_addr: string; package?: string; /** * The debug image address of this frame. * Formatted as hex with 0x prefix. */ image_addr?: string; in_app?: boolean; /** * The symbol name of this frame. * If symbolicated locally. */ function?: string; /** * The symbol address of this frame. * If symbolicated locally. * Formatted as hex with 0x prefix. */ symbol_addr?: string; }; export type NativeDebugImage = { name?: string; type?: string; uuid?: string; debug_id?: string; image_addr?: string; image_size?: number; code_file?: string; image_vmaddr?: string; }; export type NativeStackFrames = { frames: NativeStackFrame[]; debugMetaImages?: NativeDebugImage[]; }; export type NativeAppStartResponse = { type: 'cold' | 'warm' | 'unknown'; has_fetched: boolean; app_start_timestamp_ms?: number; spans: { description: string; start_timestamp_ms: number; end_timestamp_ms: number; }[]; }; export type NativeFramesResponse = { totalFrames: number; slowFrames: number; frozenFrames: number; }; export type NativeReleaseResponse = { build: string; id: string; version: string; }; /** * This type describes serialized scope from sentry-cocoa and sentry-android * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32 */ export type NativeDeviceContextsResponse = { [key: string]: unknown; tags?: Record; extra?: Record; contexts?: Record>; user?: { userId?: string; email?: string; username?: string; ipAddress?: string; data?: Record; }; dist?: string; environment?: string; fingerprint?: string[]; level?: string; breadcrumbs?: { level?: string; timestamp?: string; category?: string; type?: string; message?: string; data?: Record; }[]; }; export type NativeScreenshot = { data: number[]; contentType: string; filename: string; }; declare const _default: Spec; export default _default; //# sourceMappingURL=NativeRNSentry.d.ts.map