1 | import { APIDetails } from '@sentry/core';
|
2 | import { Event, Outcome, Response as SentryResponse, SentryRequest, SentryRequestType, Session, Transport, TransportOptions } from '@sentry/types';
|
3 | import { PromiseBuffer, RateLimits } from '@sentry/utils';
|
4 |
|
5 | export declare abstract class BaseTransport implements Transport {
|
6 | options: TransportOptions;
|
7 | |
8 |
|
9 |
|
10 | url: string;
|
11 |
|
12 | protected readonly _api: APIDetails;
|
13 |
|
14 | protected readonly _buffer: PromiseBuffer<SentryResponse>;
|
15 |
|
16 | protected _rateLimits: RateLimits;
|
17 | protected _outcomes: {
|
18 | [key: string]: number;
|
19 | };
|
20 | constructor(options: TransportOptions);
|
21 | /**
|
22 | * @inheritDoc
|
23 | */
|
24 | sendEvent(event: Event): PromiseLike<SentryResponse>;
|
25 | /**
|
26 | * @inheritDoc
|
27 | */
|
28 | sendSession(session: Session): PromiseLike<SentryResponse>;
|
29 | /**
|
30 | * @inheritDoc
|
31 | */
|
32 | close(timeout?: number): PromiseLike<boolean>;
|
33 | /**
|
34 | * @inheritDoc
|
35 | */
|
36 | recordLostEvent(reason: Outcome, category: SentryRequestType): void;
|
37 | /**
|
38 | * Send outcomes as an envelope
|
39 | */
|
40 | protected _flushOutcomes(): void;
|
41 | /**
|
42 | * Handle Sentry repsonse for promise-based transports.
|
43 | */
|
44 | protected _handleResponse({ requestType, response, headers, resolve, reject, }: {
|
45 | requestType: SentryRequestType;
|
46 | response: Response | XMLHttpRequest;
|
47 | headers: Record<string, string | null>;
|
48 | resolve: (value?: SentryResponse | PromiseLike<SentryResponse> | null | undefined) => void;
|
49 | reject: (reason?: unknown) => void;
|
50 | }): void;
|
51 | /**
|
52 | * Gets the time that given category is disabled until for rate limiting
|
53 | *
|
54 | * @deprecated Please use `disabledUntil` from @sentry/utils
|
55 | */
|
56 | protected _disabledUntil(requestType: SentryRequestType): Date;
|
57 | /**
|
58 | * Checks if a category is rate limited
|
59 | *
|
60 | * @deprecated Please use `isRateLimited` from @sentry/utils
|
61 | */
|
62 | protected _isRateLimited(requestType: SentryRequestType): boolean;
|
63 | protected abstract _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike<SentryResponse>;
|
64 | }
|
65 | //# sourceMappingURL=base.d.ts.map |
\ | No newline at end of file |