fields.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. export type ColumnType =
  2. | 'boolean'
  3. | 'date'
  4. | 'duration'
  5. | 'integer'
  6. | 'number'
  7. | 'percentage'
  8. | 'string';
  9. export enum FieldKey {
  10. ASSIGNEE = 'assignee',
  11. TITLE = 'title',
  12. ISSUE = 'issue',
  13. LEVEL = 'level',
  14. STATUS = 'status',
  15. PLATFORM = 'platform',
  16. IS_BOOKMARKED = 'isBookmarked',
  17. IS_SUBSCRIBED = 'isSubscribed',
  18. IS_HANDLED = 'isHandled',
  19. LAST_SEEN = 'lastSeen',
  20. FIRST_SEEN = 'firstSeen',
  21. EVENTS = 'events',
  22. USERS = 'users',
  23. LIFETIME_EVENTS = 'lifetimeEvents',
  24. LIFETIME_USERS = 'lifetimeUsers',
  25. PROJECT = 'project',
  26. LINKS = 'links',
  27. }
  28. export const ISSUE_FIELDS: Readonly<Record<FieldKey, ColumnType>> = {
  29. [FieldKey.ASSIGNEE]: 'string',
  30. [FieldKey.TITLE]: 'string',
  31. [FieldKey.ISSUE]: 'string',
  32. [FieldKey.LEVEL]: 'string',
  33. [FieldKey.STATUS]: 'string',
  34. [FieldKey.PLATFORM]: 'string',
  35. [FieldKey.IS_BOOKMARKED]: 'boolean',
  36. [FieldKey.IS_SUBSCRIBED]: 'boolean',
  37. [FieldKey.IS_HANDLED]: 'boolean',
  38. [FieldKey.LAST_SEEN]: 'date',
  39. [FieldKey.FIRST_SEEN]: 'date',
  40. [FieldKey.EVENTS]: 'string',
  41. [FieldKey.USERS]: 'string',
  42. [FieldKey.LIFETIME_EVENTS]: 'string',
  43. [FieldKey.LIFETIME_USERS]: 'string',
  44. [FieldKey.PROJECT]: 'string',
  45. [FieldKey.LINKS]: 'string',
  46. };
  47. export const ISSUE_FIELD_TO_HEADER_MAP = {
  48. [FieldKey.LIFETIME_EVENTS]: 'Lifetime Events',
  49. [FieldKey.LIFETIME_USERS]: 'Lifetime Users',
  50. };