import type { AttachmentType } from './attachment'; import type { SerializedCheckIn } from './checkin'; import type { ClientReport } from './clientreport'; import type { DsnComponents } from './dsn'; import type { Event } from './event'; import type { FeedbackEvent, UserFeedback } from './feedback'; import type { Profile, ProfileChunk } from './profiling'; import type { ReplayEvent, ReplayRecordingData } from './replay'; import type { SdkInfo } from './sdkinfo'; import type { SerializedSession, SessionAggregates } from './session'; import type { SpanJSON } from './span'; export type DynamicSamplingContext = { trace_id: string; public_key: DsnComponents['publicKey']; sample_rate?: string; release?: string; environment?: string; transaction?: string; replay_id?: string; sampled?: string; }; export type EnvelopeItemType = 'client_report' | 'user_report' | 'feedback' | 'session' | 'sessions' | 'transaction' | 'attachment' | 'event' | 'profile' | 'profile_chunk' | 'replay_event' | 'replay_recording' | 'check_in' | 'statsd' | 'span'; export type BaseEnvelopeHeaders = { [key: string]: unknown; dsn?: string; sdk?: SdkInfo; }; export type BaseEnvelopeItemHeaders = { [key: string]: unknown; type: EnvelopeItemType; length?: number; }; type BaseEnvelopeItem = [ItemHeader & BaseEnvelopeItemHeaders, P]; type BaseEnvelope = [ EnvelopeHeader & BaseEnvelopeHeaders, Array> ]; type EventItemHeaders = { type: 'event' | 'transaction' | 'profile' | 'feedback'; }; type AttachmentItemHeaders = { type: 'attachment'; length: number; filename: string; content_type?: string; attachment_type?: AttachmentType; }; type UserFeedbackItemHeaders = { type: 'user_report'; }; type FeedbackItemHeaders = { type: 'feedback'; }; type SessionItemHeaders = { type: 'session'; }; type SessionAggregatesItemHeaders = { type: 'sessions'; }; type ClientReportItemHeaders = { type: 'client_report'; }; type ReplayEventItemHeaders = { type: 'replay_event'; }; type ReplayRecordingItemHeaders = { type: 'replay_recording'; length: number; }; type CheckInItemHeaders = { type: 'check_in'; }; type ProfileItemHeaders = { type: 'profile'; }; type ProfileChunkItemHeaders = { type: 'profile_chunk'; }; type StatsdItemHeaders = { type: 'statsd'; length: number; }; type SpanItemHeaders = { type: 'span'; }; export type EventItem = BaseEnvelopeItem; export type AttachmentItem = BaseEnvelopeItem; export type UserFeedbackItem = BaseEnvelopeItem; export type SessionItem = BaseEnvelopeItem | BaseEnvelopeItem; export type ClientReportItem = BaseEnvelopeItem; export type CheckInItem = BaseEnvelopeItem; type ReplayEventItem = BaseEnvelopeItem; type ReplayRecordingItem = BaseEnvelopeItem; export type StatsdItem = BaseEnvelopeItem; export type FeedbackItem = BaseEnvelopeItem; export type ProfileItem = BaseEnvelopeItem; export type ProfileChunkItem = BaseEnvelopeItem; export type SpanItem = BaseEnvelopeItem>; export type EventEnvelopeHeaders = { event_id: string; sent_at: string; trace?: DynamicSamplingContext; }; type SessionEnvelopeHeaders = { sent_at: string; }; type CheckInEnvelopeHeaders = { trace?: DynamicSamplingContext; }; type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders; type ReplayEnvelopeHeaders = BaseEnvelopeHeaders; type StatsdEnvelopeHeaders = BaseEnvelopeHeaders; type SpanEnvelopeHeaders = BaseEnvelopeHeaders & { trace?: DynamicSamplingContext; }; export type EventEnvelope = BaseEnvelope; export type SessionEnvelope = BaseEnvelope; export type ClientReportEnvelope = BaseEnvelope; export type ReplayEnvelope = [ReplayEnvelopeHeaders, [ReplayEventItem, ReplayRecordingItem]]; export type CheckInEnvelope = BaseEnvelope; export type StatsdEnvelope = BaseEnvelope; export type SpanEnvelope = BaseEnvelope; export type ProfileChunkEnvelope = BaseEnvelope; export type Envelope = EventEnvelope | SessionEnvelope | ClientReportEnvelope | ProfileChunkEnvelope | ReplayEnvelope | CheckInEnvelope | StatsdEnvelope | SpanEnvelope; export type EnvelopeItem = Envelope[1][number]; export {}; //# sourceMappingURL=envelope.d.ts.map