Skip to content

Commit

Permalink
added feedback type into feedback folder
Browse files Browse the repository at this point in the history
  • Loading branch information
c298lee authored and billyvg committed Sep 29, 2023
1 parent d523875 commit f31aa3e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/feedback/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { SendFeedbackData } from './types'
17 changes: 17 additions & 0 deletions packages/feedback/src/types/feedback.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
import type {Event} from '@sentry/types';

/**
* NOTE: These types are still considered Beta and subject to change.
* @hidden
*/
export interface FeedbackEvent extends Event {
feedback: {
contact_email: string;
message: string;
replay_id: string;
url: string;
};
// TODO: Add this event type to Event
// type: 'feedback_event';
}

export interface SendFeedbackData {
message: string,
email: string,
Expand Down
3 changes: 2 additions & 1 deletion packages/feedback/src/util/prepareFeedbackEvent.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {Scope} from '@sentry/core';
import {prepareEvent} from '@sentry/core';
import type {Client, FeedbackEvent} from '@sentry/types';
import type { Client, FeedbackEvent } from '@sentry/types';
// import type { FeedbackEvent } from '../types';

/**
* Prepare a feedback event & enrich it with the SDK metadata.
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"compilerOptions": {
"module": "esnext"
},
"include": ["src/**/*.ts", "../feedback/src/util/sendFeedbackRequest.ts", "../feedback/src/types/feedback.ts"]
"include": ["src/**/*.ts"]
}

0 comments on commit f31aa3e

Please sign in to comment.