1 | import type { BrowserClientProfilingOptions, BrowserClientReplayOptions, ClientOptions, Event, EventHint, Options, ParameterizedString, Scope, SeverityLevel, UserFeedback } from '@sentry/core';
|
2 | import { BaseClient } from '@sentry/core';
|
3 | import type { BrowserTransportOptions } from './transports/types';
|
4 | /**
|
5 | * Configuration options for the Sentry Browser SDK.
|
6 | * @see @sentry/core Options for more information.
|
7 | */
|
8 | export type BrowserOptions = Options<BrowserTransportOptions> & BrowserClientReplayOptions & BrowserClientProfilingOptions & {
|
9 | /**
|
10 | * Important: Only set this option if you know what you are doing!
|
11 | *
|
12 | * By default, the SDK will check if `Sentry.init` is called in a browser extension.
|
13 | * In case it is, it will stop initialization and log a warning
|
14 | * because browser extensions require a different Sentry initialization process:
|
15 | * https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/
|
16 | *
|
17 | * Setting up the SDK in a browser extension with global error monitoring is not recommended
|
18 | * and will likely flood you with errors from other web sites or extensions. This can heavily
|
19 | * impact your quota and cause interference with your and other Sentry SDKs in shared environments.
|
20 | *
|
21 | * If this check wrongfully flags your setup as a browser extension, you can set this
|
22 | * option to `true` to skip the check.
|
23 | *
|
24 | * @default false
|
25 | */
|
26 | skipBrowserExtensionCheck?: boolean;
|
27 | };
|
28 | /**
|
29 | * Configuration options for the Sentry Browser SDK Client class
|
30 | * @see BrowserClient for more information.
|
31 | */
|
32 | export type BrowserClientOptions = ClientOptions<BrowserTransportOptions> & BrowserClientReplayOptions & BrowserClientProfilingOptions & {
|
33 | /** If configured, this URL will be used as base URL for lazy loading integration. */
|
34 | cdnBaseUrl?: string;
|
35 | };
|
36 | /**
|
37 | * The Sentry Browser SDK Client.
|
38 | *
|
39 | * @see BrowserOptions for documentation on configuration options.
|
40 | * @see SentryClient for usage documentation.
|
41 | */
|
42 | export declare class BrowserClient extends BaseClient<BrowserClientOptions> {
|
43 | /**
|
44 | * Creates a new Browser SDK instance.
|
45 | *
|
46 | * @param options Configuration options for this SDK.
|
47 | */
|
48 | constructor(options: BrowserClientOptions);
|
49 | /**
|
50 | * @inheritDoc
|
51 | */
|
52 | eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
|
53 | /**
|
54 | * @inheritDoc
|
55 | */
|
56 | eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
|
57 | /**
|
58 | * Sends user feedback to Sentry.
|
59 | *
|
60 | * @deprecated Use `captureFeedback` instead.
|
61 | */
|
62 | captureUserFeedback(feedback: UserFeedback): void;
|
63 | /**
|
64 | * @inheritDoc
|
65 | */
|
66 | protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event | null>;
|
67 | }
|
68 | //# sourceMappingURL=client.d.ts.map |
\ | No newline at end of file |