UNPKG

1.1 kBTypeScriptView Raw
1import type { Client } from './client';
2import type { Envelope } from './envelope';
3export type TransportRequest = {
4 body: string | Uint8Array;
5};
6export type TransportMakeRequestResponse = {
7 statusCode?: number;
8 headers?: {
9 [key: string]: string | null;
10 'x-sentry-rate-limits': string | null;
11 'retry-after': string | null;
12 };
13};
14export interface InternalBaseTransportOptions {
15 /**
16 * @ignore
17 * Users should pass the tunnel property via the init/client options.
18 * This is only used by the SDK to pass the tunnel to the transport.
19 */
20 tunnel?: string;
21 bufferSize?: number;
22 recordDroppedEvent: Client['recordDroppedEvent'];
23}
24export interface BaseTransportOptions extends InternalBaseTransportOptions {
25 url: string;
26}
27export interface Transport {
28 send(request: Envelope): PromiseLike<TransportMakeRequestResponse>;
29 flush(timeout?: number): PromiseLike<boolean>;
30}
31export type TransportRequestExecutor = (request: TransportRequest) => PromiseLike<TransportMakeRequestResponse>;
32//# sourceMappingURL=transport.d.ts.map
\No newline at end of file