Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/types/src/envelope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import type { ClientReport } from './clientreport';
import type { DsnComponents } from './dsn';
import type { Event } from './event';
import type { FeedbackEvent } from './feedback';
import type { UserFeedback } from './feedback';
import type { Profile } from './profiling';
import type { ReplayEvent, ReplayRecordingData } from './replay';
import type { SdkInfo } from './sdkinfo';
import type { SerializedSession, Session, SessionAggregates } from './session';
import type { Transaction } from './transaction';
import type { UserFeedback } from './user';

// Based on: https://develop.sentry.dev/sdk/envelopes/

Expand Down
13 changes: 12 additions & 1 deletion packages/types/src/feedback.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import type { Event } from './event';
import type { User } from './user';

export interface FeedbackContext extends Record<string, unknown> {
/**
* Crash report feedback object
*/
export interface UserFeedback {
event_id: string;
email: User['email'];
name: string;
comments: string;
}

interface FeedbackContext extends Record<string, unknown> {
message: string;
contact_email?: string;
name?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export type {
Profile,
} from './profiling';
export type { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './replay';
export type { FeedbackEvent } from './feedback';
export type { FeedbackEvent, UserFeedback } from './feedback';
export type { QueryParams, Request, SanitizedRequestData } from './request';
export type { Runtime } from './runtime';
export type { CaptureContext, Scope, ScopeContext, ScopeData } from './scope';
Expand Down Expand Up @@ -131,7 +131,7 @@ export type {
BaseTransportOptions,
TransportRequestExecutor,
} from './transport';
export type { User, UserFeedback } from './user';
export type { User } from './user';
export type { WebFetchHeaders, WebFetchRequest } from './webfetchapi';
export type { WrappedFunction } from './wrappedfunction';
export type {
Expand Down
7 changes: 0 additions & 7 deletions packages/types/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@ export interface User {
email?: string;
username?: string;
}

export interface UserFeedback {
event_id: string;
email: User['email'];
name: string;
comments: string;
}