feedbackIssue.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import {ProjectFixture} from 'sentry-fixture/project';
  2. import {EventOrGroupType} from 'sentry/types/event';
  3. import {GroupStatus, PriorityLevel} from 'sentry/types/group';
  4. import type {FeedbackIssue} from 'sentry/utils/feedback/types';
  5. type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
  6. type PartialMetadata = Partial<FeedbackIssue['metadata']>;
  7. export function FeedbackIssueFixture(
  8. params: Partial<Overwrite<FeedbackIssue, {metadata: PartialMetadata}>>
  9. ): FeedbackIssue {
  10. return {
  11. id: '5146636313',
  12. shareId: '',
  13. shortId: 'JAVASCRIPT-2SDJ',
  14. title: 'User Feedback',
  15. culprit: 'user',
  16. permalink:
  17. 'https://sentry.sentry.io/feedback/?feedbackSlug=javascript%3A5146636313&project=11276',
  18. logger: null,
  19. level: 'info',
  20. status: GroupStatus.UNRESOLVED,
  21. statusDetails: {},
  22. substatus: null,
  23. isPublic: false,
  24. platform: 'javascript',
  25. project: ProjectFixture({
  26. platform: 'javascript',
  27. }),
  28. type: EventOrGroupType.GENERIC,
  29. filtered: null,
  30. numComments: 0,
  31. assignedTo: null,
  32. isBookmarked: false,
  33. isSubscribed: false,
  34. subscriptionDetails: {
  35. disabled: true,
  36. },
  37. hasSeen: true,
  38. annotations: [],
  39. issueType: 'feedback',
  40. issueCategory: 'feedback',
  41. priority: PriorityLevel.MEDIUM,
  42. priorityLockedAt: null,
  43. isUnhandled: false,
  44. count: '1',
  45. userCount: 1,
  46. firstSeen: '2024-04-05T20:05:02.938000Z',
  47. lastSeen: '2024-04-05T20:05:02Z',
  48. inbox: null,
  49. owners: null,
  50. activity: [],
  51. seenBy: [],
  52. pluginActions: [],
  53. pluginIssues: [],
  54. pluginContexts: [],
  55. userReportCount: 0,
  56. stats: {},
  57. participants: [],
  58. ...params,
  59. metadata: {
  60. title: 'User Feedback',
  61. value: 'feedback test 4',
  62. initial_priority: 50,
  63. contact_email: 'josh.ferge@sentry.io',
  64. message: 'feedback test 4',
  65. name: 'Josh Ferge',
  66. source: 'new_feedback_envelope',
  67. sdk: {
  68. name: 'sentry.javascript.react',
  69. name_normalized: 'sentry.javascript.react',
  70. },
  71. ...params.metadata,
  72. },
  73. };
  74. }