feedbackIssue.tsx 2.0 KB

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