1 | import { EventProcessor, Hub, Integration } from '@sentry/types';
|
2 | interface Report {
|
3 | [key: string]: unknown;
|
4 | type: ReportTypes;
|
5 | url: string;
|
6 | body?: ReportBody;
|
7 | }
|
8 | declare type ReportTypes = 'crash' | 'deprecation' | 'intervention';
|
9 | declare type ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;
|
10 | interface CrashReportBody {
|
11 | [key: string]: unknown;
|
12 | crashId: string;
|
13 | reason?: string;
|
14 | }
|
15 | interface DeprecationReportBody {
|
16 | [key: string]: unknown;
|
17 | id: string;
|
18 | anticipatedRemoval?: Date;
|
19 | message: string;
|
20 | sourceFile?: string;
|
21 | lineNumber?: number;
|
22 | columnNumber?: number;
|
23 | }
|
24 | interface InterventionReportBody {
|
25 | [key: string]: unknown;
|
26 | id: string;
|
27 | message: string;
|
28 | sourceFile?: string;
|
29 | lineNumber?: number;
|
30 | columnNumber?: number;
|
31 | }
|
32 |
|
33 | export declare class ReportingObserver implements Integration {
|
34 | private readonly _options;
|
35 | |
36 |
|
37 |
|
38 | static id: string;
|
39 | |
40 |
|
41 |
|
42 | readonly name: string;
|
43 | |
44 |
|
45 |
|
46 | private _getCurrentHub?;
|
47 | |
48 |
|
49 |
|
50 | constructor(_options?: {
|
51 | types?: ReportTypes[];
|
52 | });
|
53 | /**
|
54 | * @inheritDoc
|
55 | */
|
56 | setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
57 | /**
|
58 | * @inheritDoc
|
59 | */
|
60 | handler(reports: Report[]): void;
|
61 | }
|
62 | export {};
|
63 |
|
\ | No newline at end of file |