1 | import { DsnLike } from './dsn';
|
2 | import { Event } from './event';
|
3 | import { Response } from './response';
|
4 | import { SdkMetadata } from './sdkmetadata';
|
5 | import { Session, SessionAggregates } from './session';
|
6 | /** Transport used sending data to Sentry */
|
7 | export interface Transport {
|
8 | /**
|
9 | * Sends the event to the Store endpoint in Sentry.
|
10 | *
|
11 | * @param event Event that should be sent to Sentry.
|
12 | */
|
13 | sendEvent(event: Event): PromiseLike<Response>;
|
14 | /**
|
15 | * Sends the session to the Envelope endpoint in Sentry.
|
16 | *
|
17 | * @param session Session that should be sent to Sentry | Session Aggregates that should be sent to Sentry.
|
18 | */
|
19 | sendSession?(session: Session | SessionAggregates): PromiseLike<Response>;
|
20 | /**
|
21 | * Call this function to wait until all pending requests have been sent.
|
22 | *
|
23 | * @param timeout Number time in ms to wait until the buffer is drained.
|
24 | */
|
25 | close(timeout?: number): PromiseLike<boolean>;
|
26 | }
|
27 | /** JSDoc */
|
28 | export declare type TransportClass<T extends Transport> = new (options: TransportOptions) => T;
|
29 | /** JSDoc */
|
30 | export interface TransportOptions {
|
31 | /** Sentry DSN */
|
32 | dsn: DsnLike;
|
33 | /** Define custom headers */
|
34 | headers?: {
|
35 | [key: string]: string;
|
36 | };
|
37 | /** Set a HTTP proxy that should be used for outbound requests. */
|
38 | httpProxy?: string;
|
39 | /** Set a HTTPS proxy that should be used for outbound requests. */
|
40 | httpsProxy?: string;
|
41 | /** HTTPS proxy certificates path */
|
42 | caCerts?: string;
|
43 | /** Fetch API init parameters */
|
44 | fetchParameters?: {
|
45 | [key: string]: string;
|
46 | };
|
47 | /**
|
48 | * Set of metadata about the SDK that can be internally used to enhance envelopes and events,
|
49 | * and provide additional data about every request.
|
50 | * */
|
51 | _metadata?: SdkMetadata;
|
52 | }
|
53 | //# sourceMappingURL=transport.d.ts.map |
\ | No newline at end of file |