Skip to content

Commit 5469f89

Browse files
lforstmydea
andauthored
feat(lforst): Only allow SerializedSession in session envelope items (#11979)
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
1 parent b188e61 commit 5469f89

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/types/src/envelope.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { FeedbackEvent, UserFeedback } from './feedback';
77
import type { Profile } from './profiling';
88
import type { ReplayEvent, ReplayRecordingData } from './replay';
99
import type { SdkInfo } from './sdkinfo';
10-
import type { SerializedSession, Session, SessionAggregates } from './session';
10+
import type { SerializedSession, SessionAggregates } from './session';
1111
import type { SpanJSON } from './span';
1212

1313
// Based on: https://develop.sentry.dev/sdk/envelopes/
@@ -87,8 +87,7 @@ export type EventItem = BaseEnvelopeItem<EventItemHeaders, Event>;
8787
export type AttachmentItem = BaseEnvelopeItem<AttachmentItemHeaders, string | Uint8Array>;
8888
export type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>;
8989
export type SessionItem =
90-
// TODO(v8): Only allow serialized session here (as opposed to Session or SerializedSesison)
91-
| BaseEnvelopeItem<SessionItemHeaders, Session | SerializedSession>
90+
| BaseEnvelopeItem<SessionItemHeaders, SerializedSession>
9291
| BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>;
9392
export type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>;
9493
export type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn>;

0 commit comments

Comments
 (0)