1 | import type { Attachment, Breadcrumb, CaptureContext, Client, Context, Contexts, Event, EventHint, EventProcessor, Extra, Extras, Primitive, PropagationContext, RequestSession, Scope as ScopeInterface, ScopeData, Session, SeverityLevel, User } from '@sentry/types';
|
2 |
|
3 |
|
4 |
|
5 | declare class ScopeClass implements ScopeInterface {
|
6 |
|
7 | protected _notifyingListeners: boolean;
|
8 |
|
9 | protected _scopeListeners: Array<(scope: Scope) => void>;
|
10 |
|
11 | protected _eventProcessors: EventProcessor[];
|
12 |
|
13 | protected _breadcrumbs: Breadcrumb[];
|
14 |
|
15 | protected _user: User;
|
16 |
|
17 | protected _tags: {
|
18 | [key: string]: Primitive;
|
19 | };
|
20 |
|
21 | protected _extra: Extras;
|
22 |
|
23 | protected _contexts: Contexts;
|
24 |
|
25 | protected _attachments: Attachment[];
|
26 |
|
27 | protected _propagationContext: PropagationContext;
|
28 | |
29 |
|
30 |
|
31 |
|
32 | protected _sdkProcessingMetadata: {
|
33 | [key: string]: unknown;
|
34 | };
|
35 |
|
36 | protected _fingerprint?: string[];
|
37 |
|
38 | protected _level?: SeverityLevel;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | protected _transactionName?: string;
|
46 |
|
47 | protected _session?: Session;
|
48 |
|
49 | protected _requestSession?: RequestSession;
|
50 |
|
51 | protected _client?: Client;
|
52 |
|
53 | protected _lastEventId?: string;
|
54 | constructor();
|
55 | /**
|
56 | * @inheritDoc
|
57 | */
|
58 | clone(): ScopeClass;
|
59 | /**
|
60 | * @inheritDoc
|
61 | */
|
62 | setClient(client: Client | undefined): void;
|
63 | /**
|
64 | * @inheritDoc
|
65 | */
|
66 | setLastEventId(lastEventId: string | undefined): void;
|
67 | /**
|
68 | * @inheritDoc
|
69 | */
|
70 | getClient<C extends Client>(): C | undefined;
|
71 | /**
|
72 | * @inheritDoc
|
73 | */
|
74 | lastEventId(): string | undefined;
|
75 | /**
|
76 | * @inheritDoc
|
77 | */
|
78 | addScopeListener(callback: (scope: Scope) => void): void;
|
79 | /**
|
80 | * @inheritDoc
|
81 | */
|
82 | addEventProcessor(callback: EventProcessor): this;
|
83 | /**
|
84 | * @inheritDoc
|
85 | */
|
86 | setUser(user: User | null): this;
|
87 | /**
|
88 | * @inheritDoc
|
89 | */
|
90 | getUser(): User | undefined;
|
91 | /**
|
92 | * @inheritDoc
|
93 | */
|
94 | getRequestSession(): RequestSession | undefined;
|
95 | /**
|
96 | * @inheritDoc
|
97 | */
|
98 | setRequestSession(requestSession?: RequestSession): this;
|
99 | /**
|
100 | * @inheritDoc
|
101 | */
|
102 | setTags(tags: {
|
103 | [key: string]: Primitive;
|
104 | }): this;
|
105 | /**
|
106 | * @inheritDoc
|
107 | */
|
108 | setTag(key: string, value: Primitive): this;
|
109 | /**
|
110 | * @inheritDoc
|
111 | */
|
112 | setExtras(extras: Extras): this;
|
113 | /**
|
114 | * @inheritDoc
|
115 | */
|
116 | setExtra(key: string, extra: Extra): this;
|
117 | /**
|
118 | * @inheritDoc
|
119 | */
|
120 | setFingerprint(fingerprint: string[]): this;
|
121 | /**
|
122 | * @inheritDoc
|
123 | */
|
124 | setLevel(level: SeverityLevel): this;
|
125 | /**
|
126 | * @inheritDoc
|
127 | */
|
128 | setTransactionName(name?: string): this;
|
129 | /**
|
130 | * @inheritDoc
|
131 | */
|
132 | setContext(key: string, context: Context | null): this;
|
133 | /**
|
134 | * @inheritDoc
|
135 | */
|
136 | setSession(session?: Session): this;
|
137 | /**
|
138 | * @inheritDoc
|
139 | */
|
140 | getSession(): Session | undefined;
|
141 | /**
|
142 | * @inheritDoc
|
143 | */
|
144 | update(captureContext?: CaptureContext): this;
|
145 | /**
|
146 | * @inheritDoc
|
147 | */
|
148 | clear(): this;
|
149 | /**
|
150 | * @inheritDoc
|
151 | */
|
152 | addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
|
153 | /**
|
154 | * @inheritDoc
|
155 | */
|
156 | getLastBreadcrumb(): Breadcrumb | undefined;
|
157 | /**
|
158 | * @inheritDoc
|
159 | */
|
160 | clearBreadcrumbs(): this;
|
161 | /**
|
162 | * @inheritDoc
|
163 | */
|
164 | addAttachment(attachment: Attachment): this;
|
165 | /**
|
166 | * @inheritDoc
|
167 | */
|
168 | clearAttachments(): this;
|
169 | /** @inheritDoc */
|
170 | getScopeData(): ScopeData;
|
171 | /**
|
172 | * @inheritDoc
|
173 | */
|
174 | setSDKProcessingMetadata(newData: {
|
175 | [key: string]: unknown;
|
176 | }): this;
|
177 | /**
|
178 | * @inheritDoc
|
179 | */
|
180 | setPropagationContext(context: PropagationContext): this;
|
181 | /**
|
182 | * @inheritDoc
|
183 | */
|
184 | getPropagationContext(): PropagationContext;
|
185 | /**
|
186 | * @inheritDoc
|
187 | */
|
188 | captureException(exception: unknown, hint?: EventHint): string;
|
189 | /**
|
190 | * @inheritDoc
|
191 | */
|
192 | captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string;
|
193 | /**
|
194 | * @inheritDoc
|
195 | */
|
196 | captureEvent(event: Event, hint?: EventHint): string;
|
197 | /**
|
198 | * This will be called on every set call.
|
199 | */
|
200 | protected _notifyScopeListeners(): void;
|
201 | }
|
202 | /**
|
203 | * Holds additional event information.
|
204 | */
|
205 | export declare const Scope: typeof ScopeClass;
|
206 | /**
|
207 | * Holds additional event information.
|
208 | */
|
209 | export type Scope = ScopeInterface;
|
210 | export {};
|
211 |
|
\ | No newline at end of file |