import { ReportDialogOptions } from '@sentry/browser'; import { Event } from '@sentry/types'; import { ElectronOptions } from './common'; /** * The Sentry Electron SDK Client. * * To use this SDK, call the {@link init} function as early as possible in the * entry modules. This applies to the main process as well as all renderer * processes or further sub processes you spawn. To set context information or * send manual events, use the provided methods. * * @example * const { init } = require('@sentry/electron'); * * init({ * dsn: '__DSN__', * // ... * }); * * @example * import { configureScope } from '@sentry/electron'; * configureScope((scope: Scope) => { * scope.setExtra({ battery: 0.7 }); * scope.setTags({ user_mode: 'admin' }); * scope.setUser({ id: '4711' }); * }); * * @example * import { addBreadcrumb } from '@sentry/electron'; * addBreadcrumb({ * message: 'My Breadcrumb', * // ... * }); * * @example * import * as Sentry from '@sentry/electron'; * Sentry.captureMessage('Hello, world!'); * Sentry.captureException(new Error('Good bye')); * Sentry.captureEvent({ * message: 'Manual', * stacktrace: [ * // ... * ], * }); * * @see ElectronOptions for documentation on configuration options. */ export declare function init(options: ElectronOptions): void; /** * Present the user with a report dialog. * * @param options Everything is optional, we try to fetch all info need from the global scope. */ export declare function showReportDialog(options?: ReportDialogOptions): void; /** * Uploads a native crash dump (Minidump) to Sentry. * * @param path The relative or absolute path to the minidump. * @param event Optional event payload to attach to the minidump. */ export declare function captureMinidump(path: string, event?: Event): void; /** * A promise that resolves when all current events have been sent. * If you provide a timeout and the queue takes longer to drain the promise returns false. * * @param timeout Maximum time in ms the client should wait. */ export declare function flush(timeout?: number): Promise; /** * A promise that resolves when all current events have been sent. * If you provide a timeout and the queue takes longer to drain the promise returns false. * * @param timeout Maximum time in ms the client should wait. */ export declare function close(timeout?: number): Promise; //# sourceMappingURL=sdk.d.ts.map