Skip to content

Commit 6cd90c7

Browse files
committed
delete from old place
1 parent 9ed4b27 commit 6cd90c7

File tree

1 file changed

+9
-47
lines changed
  • packages/core/src/transports

1 file changed

+9
-47
lines changed

packages/core/src/transports/base.ts

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Envelope, EventStatus } from '@sentry/types';
1+
import {
2+
Envelope,
3+
InternalBaseTransportOptions,
4+
NewTransport,
5+
TransportCategory,
6+
TransportRequest,
7+
TransportRequestExecutor,
8+
TransportResponse,
9+
} from '@sentry/types';
210
import {
311
disabledUntil,
412
eventStatusFromHttpCode,
@@ -21,52 +29,6 @@ export const ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';
2129

2230
export const SESSION_TRANSPORT_CATEGORY = 'session';
2331

24-
type TransportCategory =
25-
| typeof ERROR_TRANSPORT_CATEGORY
26-
| typeof TRANSACTION_TRANSPORT_CATEGORY
27-
| typeof ATTACHMENT_TRANSPORT_CATEGORY
28-
| typeof SESSION_TRANSPORT_CATEGORY;
29-
30-
export type TransportRequest = {
31-
body: string;
32-
category: TransportCategory;
33-
};
34-
35-
export type TransportMakeRequestResponse = {
36-
body?: string;
37-
headers?: {
38-
[key: string]: string | null;
39-
'x-sentry-rate-limits': string | null;
40-
'retry-after': string | null;
41-
};
42-
reason?: string;
43-
statusCode: number;
44-
};
45-
46-
export type TransportResponse = {
47-
status: EventStatus;
48-
reason?: string;
49-
};
50-
51-
interface InternalBaseTransportOptions {
52-
bufferSize?: number;
53-
}
54-
export interface BaseTransportOptions extends InternalBaseTransportOptions {
55-
// url to send the event
56-
// transport does not care about dsn specific - client should take care of
57-
// parsing and figuring that out
58-
url: string;
59-
}
60-
61-
export interface NewTransport {
62-
send(request: Envelope): PromiseLike<TransportResponse>;
63-
flush(timeout?: number): PromiseLike<boolean>;
64-
}
65-
66-
export type TransportRequestExecutor = (request: TransportRequest) => PromiseLike<TransportMakeRequestResponse>;
67-
68-
export const DEFAULT_TRANSPORT_BUFFER_SIZE = 30;
69-
7032
/**
7133
* Creates a `NewTransport`
7234
*

0 commit comments

Comments
 (0)