@@ -2,6 +2,7 @@ import type { SerializedCheckIn } from './checkin';
2
2
import type { ClientReport } from './clientreport' ;
3
3
import type { DsnComponents } from './dsn' ;
4
4
import type { Event } from './event' ;
5
+ import type { FeedbackEvent } from './feedback' ;
5
6
import type { ReplayEvent , ReplayRecordingData } from './replay' ;
6
7
import type { SdkInfo } from './sdkinfo' ;
7
8
import type { SerializedSession , Session , SessionAggregates } from './session' ;
@@ -26,6 +27,7 @@ export type DynamicSamplingContext = {
26
27
export type EnvelopeItemType =
27
28
| 'client_report'
28
29
| 'user_report'
30
+ | 'feedback'
29
31
| 'session'
30
32
| 'sessions'
31
33
| 'transaction'
@@ -57,7 +59,7 @@ type BaseEnvelope<EnvelopeHeader, Item> = [
57
59
] ;
58
60
59
61
type EventItemHeaders = {
60
- type : 'event' | 'transaction' | 'profile' ;
62
+ type : 'event' | 'transaction' | 'profile' | 'feedback' ;
61
63
} ;
62
64
type AttachmentItemHeaders = {
63
65
type : 'attachment' ;
@@ -67,6 +69,7 @@ type AttachmentItemHeaders = {
67
69
attachment_type ?: string ;
68
70
} ;
69
71
type UserFeedbackItemHeaders = { type : 'user_report' } ;
72
+ type FeedbackItemHeaders = { type : 'feedback' } ;
70
73
type SessionItemHeaders = { type : 'session' } ;
71
74
type SessionAggregatesItemHeaders = { type : 'sessions' } ;
72
75
type ClientReportItemHeaders = { type : 'client_report' } ;
@@ -87,6 +90,7 @@ export type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn
87
90
type ReplayEventItem = BaseEnvelopeItem < ReplayEventItemHeaders , ReplayEvent > ;
88
91
type ReplayRecordingItem = BaseEnvelopeItem < ReplayRecordingItemHeaders , ReplayRecordingData > ;
89
92
export type StatsdItem = BaseEnvelopeItem < StatsdItemHeaders , string > ;
93
+ export type FeedbackItem = BaseEnvelopeItem < FeedbackItemHeaders , FeedbackEvent > ;
90
94
91
95
export type EventEnvelopeHeaders = { event_id : string ; sent_at : string ; trace ?: DynamicSamplingContext } ;
92
96
type SessionEnvelopeHeaders = { sent_at : string } ;
@@ -95,7 +99,10 @@ type ClientReportEnvelopeHeaders = BaseEnvelopeHeaders;
95
99
type ReplayEnvelopeHeaders = BaseEnvelopeHeaders ;
96
100
type StatsdEnvelopeHeaders = BaseEnvelopeHeaders ;
97
101
98
- export type EventEnvelope = BaseEnvelope < EventEnvelopeHeaders , EventItem | AttachmentItem | UserFeedbackItem > ;
102
+ export type EventEnvelope = BaseEnvelope <
103
+ EventEnvelopeHeaders ,
104
+ EventItem | AttachmentItem | UserFeedbackItem | FeedbackItem
105
+ > ;
99
106
export type SessionEnvelope = BaseEnvelope < SessionEnvelopeHeaders , SessionItem > ;
100
107
export type ClientReportEnvelope = BaseEnvelope < ClientReportEnvelopeHeaders , ClientReportItem > ;
101
108
export type ReplayEnvelope = [ ReplayEnvelopeHeaders , [ ReplayEventItem , ReplayRecordingItem ] ] ;
0 commit comments