11import type { AttachmentType } from './attachment' ;
22import type { SerializedCheckIn } from './checkin' ;
33import type { ClientReport } from './clientreport' ;
4+ import type { LegacyCSPReport } from './csp' ;
45import type { DsnComponents } from './dsn' ;
56import type { Event } from './event' ;
67import type { FeedbackEvent , UserFeedback } from './feedback' ;
@@ -41,7 +42,8 @@ export type EnvelopeItemType =
4142 | 'replay_recording'
4243 | 'check_in'
4344 | 'statsd'
44- | 'span' ;
45+ | 'span'
46+ | 'raw_security' ;
4547
4648export type BaseEnvelopeHeaders = {
4749 [ key : string ] : unknown ;
@@ -84,6 +86,7 @@ type ProfileItemHeaders = { type: 'profile' };
8486type ProfileChunkItemHeaders = { type : 'profile_chunk' } ;
8587type StatsdItemHeaders = { type : 'statsd' ; length : number } ;
8688type SpanItemHeaders = { type : 'span' } ;
89+ type RawSecurityHeaders = { type : 'raw_security' ; sentry_release ?: string ; sentry_environment ?: string } ;
8790
8891export type EventItem = BaseEnvelopeItem < EventItemHeaders , Event > ;
8992export type AttachmentItem = BaseEnvelopeItem < AttachmentItemHeaders , string | Uint8Array > ;
@@ -100,6 +103,7 @@ export type FeedbackItem = BaseEnvelopeItem<FeedbackItemHeaders, FeedbackEvent>;
100103export type ProfileItem = BaseEnvelopeItem < ProfileItemHeaders , Profile > ;
101104export type ProfileChunkItem = BaseEnvelopeItem < ProfileChunkItemHeaders , ProfileChunk > ;
102105export type SpanItem = BaseEnvelopeItem < SpanItemHeaders , Partial < SpanJSON > > ;
106+ export type RawSecurityItem = BaseEnvelopeItem < RawSecurityHeaders , LegacyCSPReport > ;
103107
104108export type EventEnvelopeHeaders = { event_id : string ; sent_at : string ; trace ?: Partial < DynamicSamplingContext > } ;
105109type SessionEnvelopeHeaders = { sent_at : string } ;
@@ -120,6 +124,7 @@ export type CheckInEnvelope = BaseEnvelope<CheckInEnvelopeHeaders, CheckInItem>;
120124export type StatsdEnvelope = BaseEnvelope < StatsdEnvelopeHeaders , StatsdItem > ;
121125export type SpanEnvelope = BaseEnvelope < SpanEnvelopeHeaders , SpanItem > ;
122126export type ProfileChunkEnvelope = BaseEnvelope < BaseEnvelopeHeaders , ProfileChunkItem > ;
127+ export type RawSecurityEnvelope = BaseEnvelope < BaseEnvelopeHeaders , RawSecurityItem > ;
123128
124129export type Envelope =
125130 | EventEnvelope
@@ -129,6 +134,7 @@ export type Envelope =
129134 | ReplayEnvelope
130135 | CheckInEnvelope
131136 | StatsdEnvelope
132- | SpanEnvelope ;
137+ | SpanEnvelope
138+ | RawSecurityEnvelope ;
133139
134140export type EnvelopeItem = Envelope [ 1 ] [ number ] ;
0 commit comments