1 | import type { SerializedCheckIn } from './checkin';
|
2 | import type { ClientReport } from './clientreport';
|
3 | import type { DsnComponents } from './dsn';
|
4 | import type { Event } from './event';
|
5 | import type { ReplayEvent, ReplayRecordingData } from './replay';
|
6 | import type { SdkInfo } from './sdkinfo';
|
7 | import type { SerializedSession, Session, SessionAggregates } from './session';
|
8 | import type { Transaction } from './transaction';
|
9 | import type { UserFeedback } from './user';
|
10 | export declare type DynamicSamplingContext = {
|
11 | trace_id: Transaction['traceId'];
|
12 | public_key: DsnComponents['publicKey'];
|
13 | sample_rate?: string;
|
14 | release?: string;
|
15 | environment?: string;
|
16 | transaction?: string;
|
17 | user_segment?: string;
|
18 | replay_id?: string;
|
19 | };
|
20 | export declare type EnvelopeItemType = 'client_report' | 'user_report' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'replay_event' | 'replay_recording' | 'check_in';
|
21 | export declare type BaseEnvelopeHeaders = {
|
22 | [key: string]: unknown;
|
23 | dsn?: string;
|
24 | sdk?: SdkInfo;
|
25 | };
|
26 | export declare type BaseEnvelopeItemHeaders = {
|
27 | [key: string]: unknown;
|
28 | type: EnvelopeItemType;
|
29 | length?: number;
|
30 | };
|
31 | declare type BaseEnvelopeItem<ItemHeader, P> = [ItemHeader & BaseEnvelopeItemHeaders, P];
|
32 | declare type BaseEnvelope<EnvelopeHeader, Item> = [EnvelopeHeader & BaseEnvelopeHeaders, Array<Item & BaseEnvelopeItem<BaseEnvelopeItemHeaders, unknown>>];
|
33 | declare type EventItemHeaders = {
|
34 | type: 'event' | 'transaction' | 'profile';
|
35 | };
|
36 | declare type AttachmentItemHeaders = {
|
37 | type: 'attachment';
|
38 | length: number;
|
39 | filename: string;
|
40 | content_type?: string;
|
41 | attachment_type?: string;
|
42 | };
|
43 | declare type UserFeedbackItemHeaders = {
|
44 | type: 'user_report';
|
45 | };
|
46 | declare type SessionItemHeaders = {
|
47 | type: 'session';
|
48 | };
|
49 | declare type SessionAggregatesItemHeaders = {
|
50 | type: 'sessions';
|
51 | };
|
52 | declare type ClientReportItemHeaders = {
|
53 | type: 'client_report';
|
54 | };
|
55 | declare type ReplayEventItemHeaders = {
|
56 | type: 'replay_event';
|
57 | };
|
58 | declare type ReplayRecordingItemHeaders = {
|
59 | type: 'replay_recording';
|
60 | length: number;
|
61 | };
|
62 | declare type CheckInItemHeaders = {
|
63 | type: 'check_in';
|
64 | };
|
65 | export declare type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;
|
66 | export declare type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;
|
67 | export declare type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>;
|
68 | export declare type SessionItem = BaseEnvelopeItem<SessionItemHeaders, Session | SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>;
|
69 | export declare type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>;
|
70 | export declare type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn>;
|
71 | declare type ReplayEventItem = BaseEnvelopeItem<ReplayEventItemHeaders, ReplayEvent>;
|
72 | declare type ReplayRecordingItem = BaseEnvelopeItem<ReplayRecordingItemHeaders, ReplayRecordingData>;
|
73 | export declare type EventEnvelopeHeaders = {
|
74 | event_id: string;
|
75 | sent_at: string;
|
76 | trace?: DynamicSamplingContext;
|
77 | };
|
78 | declare type SessionEnvelopeHeaders = {
|
79 | sent_at: string;
|
80 | };
|
81 | declare type CheckInEnvelopeHeaders = BaseEnvelopeHeaders;
|
82 | declare type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders;
|
83 | declare type ReplayEnvelopeHeaders = BaseEnvelopeHeaders;
|
84 | export declare type EventEnvelope = BaseEnvelope<EventEnvelopeHeaders, EventItem | AttachmentItem | UserFeedbackItem>;
|
85 | export declare type SessionEnvelope = BaseEnvelope<SessionEnvelopeHeaders, SessionItem>;
|
86 | export declare type ClientReportEnvelope = BaseEnvelope<ClientReportEnvelopeHeaders, ClientReportItem>;
|
87 | export declare type ReplayEnvelope = [ReplayEnvelopeHeaders, [ReplayEventItem, ReplayRecordingItem]];
|
88 | export declare type CheckInEvelope = BaseEnvelope<CheckInEnvelopeHeaders, CheckInItem>;
|
89 | export declare type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ReplayEnvelope | CheckInEvelope;
|
90 | export declare type EnvelopeItem = Envelope[1][number];
|
91 | export {};
|
92 |
|
\ | No newline at end of file |