import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { // Core init init(enableAutoScreenTracking: boolean): void; initWithScreenTrackingStatus(enableAutoScreenTracking: boolean): void; flush(): void; // Crash properties setCustomProperties(properties: Object): void; // User setCurrentUser(userId: string, properties: Object | null): void; setUserWithOrgId(userId: string, orgId: string, properties: Object | null): void; isUserLoggedIn(): Promise; // Tracking state getTrackingStatus(): Promise; setTrackingStatus(status: number): void; setCrashReportStatus(status: boolean): void; setPersonalInfoTrackingStatus(status: boolean): void; // Privacy openSettings(): void; showLastSessionCrashedPopup(): void; showPrivacyReviewPopup(): void; // Events addEvent(name: string, group: string, properties: Object): void; // Screen tracking (Android) trackScreenAttached(name: string): void; trackScreenDetached(name: string): void; // Screen tracking (iOS) trackViewEnter(name: string): void; trackViewExit(name: string): void; // Crash tracking activateCrashListener(): void; sendJSException(name: string, stacktraceOrMessage: string, stacktrace?: string, uniqueId?: string): void; sendNonFatalJsException(name: string, stacktraceOrMessage: string, stacktrace?: string, uniqueId?: string): void; } export default TurboModuleRegistry.get('AppticsReactModule');