1 | import type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';
|
2 | import type { BrowserOptions } from './client';
|
3 | /** Get the default integrations for the browser SDK. */
|
4 | export declare function getDefaultIntegrations(options: Options): Integration[];
|
5 | /**
|
6 | * The Sentry Browser SDK Client.
|
7 | *
|
8 | * To use this SDK, call the {@link init} function as early as possible when
|
9 | * loading the web page. To set context information or send manual events, use
|
10 | * the provided methods.
|
11 | *
|
12 | * @example
|
13 | *
|
14 | * ```
|
15 | *
|
16 | * import { init } from '@sentry/browser';
|
17 | *
|
18 | * init({
|
19 | * dsn: '__DSN__',
|
20 | * // ...
|
21 | * });
|
22 | * ```
|
23 | *
|
24 | * @example
|
25 | * ```
|
26 | *
|
27 | * import { addBreadcrumb } from '@sentry/browser';
|
28 | * addBreadcrumb({
|
29 | * message: 'My Breadcrumb',
|
30 | * // ...
|
31 | * });
|
32 | * ```
|
33 | *
|
34 | * @example
|
35 | *
|
36 | * ```
|
37 | *
|
38 | * import * as Sentry from '@sentry/browser';
|
39 | * Sentry.captureMessage('Hello, world!');
|
40 | * Sentry.captureException(new Error('Good bye'));
|
41 | * Sentry.captureEvent({
|
42 | * message: 'Manual',
|
43 | * stacktrace: [
|
44 | * // ...
|
45 | * ],
|
46 | * });
|
47 | * ```
|
48 | *
|
49 | * @see {@link BrowserOptions} for documentation on configuration options.
|
50 | */
|
51 | export declare function init(browserOptions?: BrowserOptions): Client | undefined;
|
52 | /**
|
53 | * All properties the report dialog supports
|
54 | */
|
55 | export interface ReportDialogOptions {
|
56 | [key: string]: any;
|
57 | eventId?: string;
|
58 | dsn?: DsnLike;
|
59 | user?: {
|
60 | email?: string;
|
61 | name?: string;
|
62 | };
|
63 | lang?: string;
|
64 | title?: string;
|
65 | subtitle?: string;
|
66 | subtitle2?: string;
|
67 | labelName?: string;
|
68 | labelEmail?: string;
|
69 | labelComments?: string;
|
70 | labelClose?: string;
|
71 | labelSubmit?: string;
|
72 | errorGeneric?: string;
|
73 | errorFormEntry?: string;
|
74 | successMessage?: string;
|
75 | /** Callback after reportDialog showed up */
|
76 | onLoad?(this: void): void;
|
77 | /** Callback after reportDialog closed */
|
78 | onClose?(this: void): void;
|
79 | }
|
80 | /**
|
81 | * Present the user with a report dialog.
|
82 | *
|
83 | * @param options Everything is optional, we try to fetch all info need from the global scope.
|
84 | */
|
85 | export declare function showReportDialog(options?: ReportDialogOptions): void;
|
86 | /**
|
87 | * This function is here to be API compatible with the loader.
|
88 | * @hidden
|
89 | */
|
90 | export declare function forceLoad(): void;
|
91 | /**
|
92 | * This function is here to be API compatible with the loader.
|
93 | * @hidden
|
94 | */
|
95 | export declare function onLoad(callback: () => void): void;
|
96 | /**
|
97 | * Captures user feedback and sends it to Sentry.
|
98 | *
|
99 | * @deprecated Use `captureFeedback` instead.
|
100 | */
|
101 | export declare function captureUserFeedback(feedback: UserFeedback): void;
|
102 | //# sourceMappingURL=sdk.d.ts.map |
\ | No newline at end of file |