1 | import { ClientReport } from './clientreport';
|
2 | import { Event } from './event';
|
3 | import { SdkInfo } from './sdkinfo';
|
4 | import { Session, SessionAggregates } from './session';
|
5 | import { TransactionSamplingMethod } from './transaction';
|
6 | import { UserFeedback } from './user';
|
7 | export declare type BaseEnvelopeHeaders = {
|
8 | [key: string]: unknown;
|
9 | dsn?: string;
|
10 | sdk?: SdkInfo;
|
11 | };
|
12 | export declare type BaseEnvelopeItemHeaders = {
|
13 | [key: string]: unknown;
|
14 | type: string;
|
15 | length?: number;
|
16 | };
|
17 | declare type BaseEnvelopeItem<IH extends BaseEnvelopeItemHeaders, P extends unknown> = [IH, P];
|
18 | declare type BaseEnvelope<EH extends BaseEnvelopeHeaders, I extends BaseEnvelopeItem<BaseEnvelopeItemHeaders, unknown>> = [EH, I[]];
|
19 | declare type EventItemHeaders = {
|
20 | type: 'event' | 'transaction';
|
21 | sample_rates?: [{
|
22 | id?: TransactionSamplingMethod;
|
23 | rate?: number;
|
24 | }];
|
25 | };
|
26 | declare type AttachmentItemHeaders = {
|
27 | type: 'attachment';
|
28 | filename: string;
|
29 | };
|
30 | declare type UserFeedbackItemHeaders = {
|
31 | type: 'user_report';
|
32 | };
|
33 | declare type SessionItemHeaders = {
|
34 | type: 'session';
|
35 | };
|
36 | declare type SessionAggregatesItemHeaders = {
|
37 | type: 'sessions';
|
38 | };
|
39 | declare type ClientReportItemHeaders = {
|
40 | type: 'client_report';
|
41 | };
|
42 | export declare type EventItem = BaseEnvelopeItem<EventItemHeaders, Event | string>;
|
43 | export declare type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, unknown>;
|
44 | export declare type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>;
|
45 | export declare type SessionItem = BaseEnvelopeItem<SessionItemHeaders, Session> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>;
|
46 | export declare type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>;
|
47 | declare type EventEnvelopeHeaders = {
|
48 | event_id: string;
|
49 | sent_at: string;
|
50 | };
|
51 | declare type SessionEnvelopeHeaders = {
|
52 | sent_at: string;
|
53 | };
|
54 | declare type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders;
|
55 | export declare type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem>;
|
56 | export declare type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
|
57 | export declare type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
|
58 | export declare type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope;
|
59 | export {};
|
60 |
|
\ | No newline at end of file |