// Type definitions for react-native-sentry // Project: https://sentry.io // Definitions by: Daniel Griesser // Definitions: https://github.com/getsentry/react-native-sentry // TypeScript Version: 2.3 import {RavenOptions} from 'raven-js'; type SentryBreadcrumbType = 'navigation' | 'http'; interface SentryBreadcrumb { message?: string; category?: string; level?: SentrySeverity; data?: object; type?: SentryBreadcrumbType; } export enum SentrySeverity { Fatal = 'fatal', Error = 'error', Warning = 'warning', Info = 'info', Debug = 'debug', Critical = 'critical' } export enum SentryLog { None = 0, Error = 1, Debug = 2, Verbose = 3 } interface SentryOptions { /** Deactivates the stacktrace merging feature. Default: true */ deactivateStacktraceMerging?: boolean; /** Deactivates the native integration and only uses raven-js */ disableNativeIntegration?: boolean; /** Handle unhandled promise rejections. Default: true */ handlePromiseRejection?: boolean; ignoreModulesExclude?: string[]; ignoreModulesInclude?: string[]; instrument?: boolean; /** Sentry log level. Default: SentryLog.None */ logLevel?: SentryLog; } export default Sentry; export class Sentry { install(): Promise; static config(dsn: string, options?: SentryOptions): Sentry; static isNativeClientAvailable(): boolean; static crash(): void; static nativeCrash(): void; static setEventSentSuccessfully(callback: Function): void; static setShouldSendCallback(callback: Function): void; static setDataCallback(callback: Function): void; static setUserContext(user: { id?: string; username?: string; email?: string; extra?: object; }): void; static setTagsContext(tags: object): void; static setExtraContext(extra: object): void; static captureMessage(message: string, options?: RavenOptions): void; static captureException(ex: Error, options?: RavenOptions): void; static captureBreadcrumb(breadcrumb: SentryBreadcrumb): void; static clearContext(): Promise; static context(func: Function, ...args: any[]): void; static context(options: object, func: Function, ...args: any[]): void; static wrap(func: Function): Function; static wrap(options: object, func: Function): Function; static wrap(func: T): T; static wrap(options: object, func: T): T; static lastException(): object; static lastException(): null; static lastEventId(): object; static lastEventId(): null; static setRelease(release: string): void; static setDist(dist: string): void; static setVersion(version: string): void; }