UNPKG

1.23 kBTypeScriptView Raw
1import type { Event, EventHint } from '../event';
2import type { Primitive } from '../misc';
3import type { User } from '../user';
4/**
5 * Crash report feedback object
6 */
7export interface UserFeedback {
8 event_id: string;
9 email: User['email'];
10 name: string;
11 comments: string;
12}
13interface FeedbackContext extends Record<string, unknown> {
14 message: string;
15 contact_email?: string;
16 name?: string;
17 replay_id?: string;
18 url?: string;
19 associated_event_id?: string;
20}
21/**
22 * NOTE: These types are still considered Alpha and subject to change.
23 * @hidden
24 */
25export interface FeedbackEvent extends Event {
26 type: 'feedback';
27 contexts: Event['contexts'] & {
28 feedback: FeedbackContext;
29 };
30}
31export interface SendFeedbackParams {
32 message: string;
33 name?: string;
34 email?: string;
35 url?: string;
36 source?: string;
37 associatedEventId?: string;
38 /**
39 * Set an object that will be merged sent as tags data with the event.
40 */
41 tags?: {
42 [key: string]: Primitive;
43 };
44}
45export type SendFeedback = (params: SendFeedbackParams, hint?: EventHint & {
46 includeReplay?: boolean;
47}) => Promise<string>;
48export {};
49//# sourceMappingURL=sendFeedback.d.ts.map
\No newline at end of file