1 | import type { Event, EventHint } from '../event';
|
2 | import type { Primitive } from '../misc';
|
3 | import type { User } from '../user';
|
4 |
|
5 |
|
6 |
|
7 | export interface UserFeedback {
|
8 | event_id: string;
|
9 | email: User['email'];
|
10 | name: string;
|
11 | comments: string;
|
12 | }
|
13 | interface 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 |
|
23 |
|
24 |
|
25 | export interface FeedbackEvent extends Event {
|
26 | type: 'feedback';
|
27 | contexts: Event['contexts'] & {
|
28 | feedback: FeedbackContext;
|
29 | };
|
30 | }
|
31 | export interface SendFeedbackParams {
|
32 | message: string;
|
33 | name?: string;
|
34 | email?: string;
|
35 | url?: string;
|
36 | source?: string;
|
37 | associatedEventId?: string;
|
38 | |
39 |
|
40 |
|
41 | tags?: {
|
42 | [key: string]: Primitive;
|
43 | };
|
44 | }
|
45 | export type SendFeedback = (params: SendFeedbackParams, hint?: EventHint & {
|
46 | includeReplay?: boolean;
|
47 | }) => Promise<string>;
|
48 | export {};
|
49 |
|
\ | No newline at end of file |