group.tsx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. import type {SearchGroup} from 'sentry/components/smartSearchBar/types';
  2. import type {PlatformKey} from 'sentry/data/platformCategories';
  3. import type {FieldKind} from 'sentry/utils/fields';
  4. import type {Actor, TimeseriesValue} from './core';
  5. import type {Event, EventMetadata, EventOrGroupType, Level} from './event';
  6. import type {Commit, PullRequest, Repository} from './integrations';
  7. import type {Team} from './organization';
  8. import type {Project} from './project';
  9. import type {AvatarUser, User} from './user';
  10. export type EntryData = Record<string, any | Array<any>>;
  11. /**
  12. * Saved issues searches
  13. */
  14. export type RecentSearch = {
  15. dateCreated: string;
  16. id: string;
  17. lastSeen: string;
  18. organizationId: string;
  19. query: string;
  20. type: SavedSearchType;
  21. };
  22. // XXX: Deprecated Sentry 9 attributes are not included here.
  23. export type SavedSearch = {
  24. dateCreated: string;
  25. id: string;
  26. isGlobal: boolean;
  27. isPinned: boolean;
  28. name: string;
  29. query: string;
  30. sort: string;
  31. type: SavedSearchType;
  32. visibility: SavedSearchVisibility;
  33. };
  34. export enum SavedSearchVisibility {
  35. ORGANIZATION = 'organization',
  36. OWNER = 'owner',
  37. OWNER_PINNED = 'owner_pinned',
  38. }
  39. export enum SavedSearchType {
  40. ISSUE = 0,
  41. EVENT = 1,
  42. SESSION = 2,
  43. REPLAY = 3,
  44. }
  45. export enum IssueCategory {
  46. PERFORMANCE = 'performance',
  47. ERROR = 'error',
  48. CRON = 'cron',
  49. PROFILE = 'profile',
  50. }
  51. export enum IssueType {
  52. // Error
  53. ERROR = 'error',
  54. // Performance
  55. PERFORMANCE_CONSECUTIVE_DB_QUERIES = 'performance_consecutive_db_queries',
  56. PERFORMANCE_CONSECUTIVE_HTTP = 'performance_consecutive_http',
  57. PERFORMANCE_FILE_IO_MAIN_THREAD = 'performance_file_io_main_thread',
  58. PERFORMANCE_DB_MAIN_THREAD = 'performance_db_main_thread',
  59. PERFORMANCE_N_PLUS_ONE_API_CALLS = 'performance_n_plus_one_api_calls',
  60. PERFORMANCE_N_PLUS_ONE_DB_QUERIES = 'performance_n_plus_one_db_queries',
  61. PERFORMANCE_SLOW_DB_QUERY = 'performance_slow_db_query',
  62. PERFORMANCE_RENDER_BLOCKING_ASSET = 'performance_render_blocking_asset_span',
  63. PERFORMANCE_UNCOMPRESSED_ASSET = 'performance_uncompressed_assets',
  64. PERFORMANCE_LARGE_HTTP_PAYLOAD = 'performance_large_http_payload',
  65. // Profile
  66. PROFILE_FILE_IO_MAIN_THREAD = 'profile_file_io_main_thread',
  67. PROFILE_IMAGE_DECODE_MAIN_THREAD = 'profile_image_decode_main_thread',
  68. PROFILE_JSON_DECODE_MAIN_THREAD = 'profile_json_decode_main_thread',
  69. PROFILE_REGEX_MAIN_THREAD = 'profile_regex_main_thread',
  70. }
  71. export const getIssueTypeFromOccurenceType = (
  72. typeId: number | undefined
  73. ): IssueType | null => {
  74. const occurrenceTypeToIssueIdMap = {
  75. 1001: IssueType.PERFORMANCE_SLOW_DB_QUERY,
  76. 1004: IssueType.PERFORMANCE_RENDER_BLOCKING_ASSET,
  77. 1006: IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
  78. 1007: IssueType.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
  79. 1008: IssueType.PERFORMANCE_FILE_IO_MAIN_THREAD,
  80. 1009: IssueType.PERFORMANCE_CONSECUTIVE_HTTP,
  81. 1010: IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS,
  82. 1012: IssueType.PERFORMANCE_UNCOMPRESSED_ASSET,
  83. 1013: IssueType.PERFORMANCE_DB_MAIN_THREAD,
  84. 1015: IssueType.PERFORMANCE_LARGE_HTTP_PAYLOAD,
  85. };
  86. if (!typeId) {
  87. return null;
  88. }
  89. return occurrenceTypeToIssueIdMap[typeId] ?? null;
  90. };
  91. // endpoint: /api/0/issues/:issueId/attachments/?limit=50
  92. export type IssueAttachment = {
  93. dateCreated: string;
  94. event_id: string;
  95. headers: object;
  96. id: string;
  97. mimetype: string;
  98. name: string;
  99. sha1: string;
  100. size: number;
  101. type: string;
  102. };
  103. // endpoint: /api/0/projects/:orgSlug/:projSlug/events/:eventId/attachments/
  104. export type EventAttachment = IssueAttachment;
  105. /**
  106. * Issue Tags
  107. */
  108. export type Tag = {
  109. key: string;
  110. name: string;
  111. isInput?: boolean;
  112. kind?: FieldKind;
  113. /**
  114. * How many values should be suggested in autocomplete.
  115. * Overrides SmartSearchBar's `maxSearchItems` prop.
  116. */
  117. maxSuggestedValues?: number;
  118. predefined?: boolean;
  119. totalValues?: number;
  120. /**
  121. * Usually values are strings, but a predefined tag can define its SearchGroups
  122. */
  123. values?: string[] | SearchGroup[];
  124. };
  125. export type TagCollection = Record<string, Tag>;
  126. export type TagValue = {
  127. count: number;
  128. firstSeen: string;
  129. lastSeen: string;
  130. name: string;
  131. value: string;
  132. email?: string;
  133. identifier?: string;
  134. ipAddress?: string;
  135. key?: string;
  136. query?: string;
  137. username?: string;
  138. } & AvatarUser;
  139. type Topvalue = {
  140. count: number;
  141. firstSeen: string;
  142. key: string;
  143. lastSeen: string;
  144. name: string;
  145. value: string;
  146. // Might not actually exist.
  147. query?: string;
  148. readable?: string;
  149. };
  150. export type TagWithTopValues = {
  151. key: string;
  152. name: string;
  153. topValues: Array<Topvalue>;
  154. totalValues: number;
  155. uniqueValues: number;
  156. canDelete?: boolean;
  157. };
  158. export const enum GroupSubstatus {
  159. ARCHIVED_UNTIL_ESCALATING = 'archived_until_escalating',
  160. ARCHIVED_UNTIL_CONDITION_MET = 'archived_until_condition_met',
  161. ARCHIVED_FOREVER = 'archived_forever',
  162. ESCALATING = 'escalating',
  163. ONGOING = 'ongoing',
  164. REGRESSED = 'regressed',
  165. NEW = 'new',
  166. }
  167. /**
  168. * Inbox, issue owners and Activity
  169. */
  170. export type InboxReasonDetails = {
  171. count?: number | null;
  172. until?: string | null;
  173. user_count?: number | null;
  174. user_window?: number | null;
  175. window?: number | null;
  176. };
  177. export const enum GroupInboxReason {
  178. NEW = 0,
  179. UNIGNORED = 1,
  180. REGRESSION = 2,
  181. MANUAL = 3,
  182. REPROCESSED = 4,
  183. ESCALATING = 5,
  184. ONGOING = 6,
  185. }
  186. export type InboxDetails = {
  187. date_added?: string;
  188. reason?: GroupInboxReason;
  189. reason_details?: InboxReasonDetails | null;
  190. };
  191. export type SuggestedOwnerReason =
  192. | 'suspectCommit'
  193. | 'ownershipRule'
  194. | 'projectOwnership'
  195. // TODO: codeowners may no longer exist
  196. | 'codeowners';
  197. // Received from the backend to denote suggested owners of an issue
  198. export type SuggestedOwner = {
  199. date_added: string;
  200. owner: string;
  201. type: SuggestedOwnerReason;
  202. };
  203. export interface ParsedOwnershipRule {
  204. matcher: {pattern: string; type: string};
  205. owners: Actor[];
  206. }
  207. export type IssueOwnership = {
  208. autoAssignment:
  209. | 'Auto Assign to Suspect Commits'
  210. | 'Auto Assign to Issue Owner'
  211. | 'Turn off Auto-Assignment';
  212. codeownersAutoSync: boolean;
  213. dateCreated: string | null;
  214. fallthrough: boolean;
  215. isActive: boolean;
  216. lastUpdated: string | null;
  217. raw: string | null;
  218. schema?: {rules: ParsedOwnershipRule[]; version: number};
  219. };
  220. export enum GroupActivityType {
  221. NOTE = 'note',
  222. SET_RESOLVED = 'set_resolved',
  223. SET_RESOLVED_BY_AGE = 'set_resolved_by_age',
  224. SET_RESOLVED_IN_RELEASE = 'set_resolved_in_release',
  225. SET_RESOLVED_IN_COMMIT = 'set_resolved_in_commit',
  226. SET_RESOLVED_IN_PULL_REQUEST = 'set_resolved_in_pull_request',
  227. SET_UNRESOLVED = 'set_unresolved',
  228. SET_IGNORED = 'set_ignored',
  229. SET_PUBLIC = 'set_public',
  230. SET_PRIVATE = 'set_private',
  231. SET_REGRESSION = 'set_regression',
  232. CREATE_ISSUE = 'create_issue',
  233. UNMERGE_SOURCE = 'unmerge_source',
  234. UNMERGE_DESTINATION = 'unmerge_destination',
  235. FIRST_SEEN = 'first_seen',
  236. ASSIGNED = 'assigned',
  237. UNASSIGNED = 'unassigned',
  238. MERGE = 'merge',
  239. REPROCESS = 'reprocess',
  240. MARK_REVIEWED = 'mark_reviewed',
  241. AUTO_SET_ONGOING = 'auto_set_ongoing',
  242. SET_ESCALATING = 'set_escalating',
  243. }
  244. interface GroupActivityBase {
  245. dateCreated: string;
  246. id: string;
  247. project: Project;
  248. assignee?: string;
  249. issue?: Group;
  250. user?: null | User;
  251. }
  252. interface GroupActivityNote extends GroupActivityBase {
  253. data: {
  254. text: string;
  255. };
  256. type: GroupActivityType.NOTE;
  257. }
  258. interface GroupActivitySetResolved extends GroupActivityBase {
  259. data: Record<string, any>;
  260. type: GroupActivityType.SET_RESOLVED;
  261. }
  262. interface GroupActivitySetUnresolved extends GroupActivityBase {
  263. data: Record<string, any>;
  264. type: GroupActivityType.SET_UNRESOLVED;
  265. }
  266. interface GroupActivitySetPublic extends GroupActivityBase {
  267. data: Record<string, any>;
  268. type: GroupActivityType.SET_PUBLIC;
  269. }
  270. interface GroupActivitySetPrivate extends GroupActivityBase {
  271. data: Record<string, any>;
  272. type: GroupActivityType.SET_PRIVATE;
  273. }
  274. interface GroupActivitySetByAge extends GroupActivityBase {
  275. data: Record<string, any>;
  276. type: GroupActivityType.SET_RESOLVED_BY_AGE;
  277. }
  278. interface GroupActivityUnassigned extends GroupActivityBase {
  279. data: Record<string, any>;
  280. type: GroupActivityType.UNASSIGNED;
  281. }
  282. interface GroupActivityFirstSeen extends GroupActivityBase {
  283. data: Record<string, any>;
  284. type: GroupActivityType.FIRST_SEEN;
  285. }
  286. interface GroupActivityMarkReviewed extends GroupActivityBase {
  287. data: Record<string, any>;
  288. type: GroupActivityType.MARK_REVIEWED;
  289. }
  290. interface GroupActivityRegression extends GroupActivityBase {
  291. data: {
  292. /**
  293. * True if the project is using semver to decide if the event is a regression.
  294. * Available when the issue was resolved in a release.
  295. */
  296. follows_semver?: boolean;
  297. /**
  298. * The version that the issue was previously resolved in.
  299. * Available when the issue was resolved in a release.
  300. */
  301. resolved_in_version?: string;
  302. version?: string;
  303. };
  304. type: GroupActivityType.SET_REGRESSION;
  305. }
  306. export interface GroupActivitySetByResolvedInNextSemverRelease extends GroupActivityBase {
  307. data: {
  308. // Set for semver releases
  309. current_release_version: string;
  310. };
  311. type: GroupActivityType.SET_RESOLVED_IN_RELEASE;
  312. }
  313. export interface GroupActivitySetByResolvedInRelease extends GroupActivityBase {
  314. data: {
  315. version?: string;
  316. };
  317. type: GroupActivityType.SET_RESOLVED_IN_RELEASE;
  318. }
  319. interface GroupActivitySetByResolvedInCommit extends GroupActivityBase {
  320. data: {
  321. commit?: Commit;
  322. };
  323. type: GroupActivityType.SET_RESOLVED_IN_COMMIT;
  324. }
  325. interface GroupActivitySetByResolvedInPullRequest extends GroupActivityBase {
  326. data: {
  327. pullRequest?: PullRequest;
  328. };
  329. type: GroupActivityType.SET_RESOLVED_IN_PULL_REQUEST;
  330. }
  331. export interface GroupActivitySetIgnored extends GroupActivityBase {
  332. data: {
  333. ignoreCount?: number;
  334. ignoreDuration?: number;
  335. ignoreUntil?: string;
  336. /** Archived until escalating */
  337. ignoreUntilEscalating?: boolean;
  338. ignoreUserCount?: number;
  339. ignoreUserWindow?: number;
  340. ignoreWindow?: number;
  341. };
  342. type: GroupActivityType.SET_IGNORED;
  343. }
  344. export interface GroupActivityReprocess extends GroupActivityBase {
  345. data: {
  346. eventCount: number;
  347. newGroupId: number;
  348. oldGroupId: number;
  349. };
  350. type: GroupActivityType.REPROCESS;
  351. }
  352. interface GroupActivityUnmergeDestination extends GroupActivityBase {
  353. data: {
  354. fingerprints: Array<string>;
  355. source?: {
  356. id: string;
  357. shortId: string;
  358. };
  359. };
  360. type: GroupActivityType.UNMERGE_DESTINATION;
  361. }
  362. interface GroupActivityUnmergeSource extends GroupActivityBase {
  363. data: {
  364. fingerprints: Array<string>;
  365. destination?: {
  366. id: string;
  367. shortId: string;
  368. };
  369. };
  370. type: GroupActivityType.UNMERGE_SOURCE;
  371. }
  372. interface GroupActivityMerge extends GroupActivityBase {
  373. data: {
  374. issues: Array<any>;
  375. };
  376. type: GroupActivityType.MERGE;
  377. }
  378. interface GroupActivityAutoSetOngoing extends GroupActivityBase {
  379. data: {
  380. afterDays?: number;
  381. };
  382. type: GroupActivityType.AUTO_SET_ONGOING;
  383. }
  384. export interface GroupActivitySetEscalating extends GroupActivityBase {
  385. data: {
  386. expired_snooze?: {
  387. count: number | null;
  388. until: Date | null;
  389. user_count: number | null;
  390. user_window: number | null;
  391. window: number | null;
  392. };
  393. forecast?: number;
  394. };
  395. type: GroupActivityType.SET_ESCALATING;
  396. }
  397. export interface GroupActivityAssigned extends GroupActivityBase {
  398. data: {
  399. assignee: string;
  400. assigneeType: string;
  401. user: Team | User;
  402. assigneeEmail?: string;
  403. /**
  404. * If the user was assigned via an integration
  405. */
  406. integration?: 'projectOwnership' | 'codeowners' | 'slack' | 'msteams';
  407. /** Codeowner or Project owner rule as a string */
  408. rule?: string;
  409. };
  410. type: GroupActivityType.ASSIGNED;
  411. }
  412. export interface GroupActivityCreateIssue extends GroupActivityBase {
  413. data: {
  414. location: string;
  415. provider: string;
  416. title: string;
  417. };
  418. type: GroupActivityType.CREATE_ISSUE;
  419. }
  420. export type GroupActivity =
  421. | GroupActivityNote
  422. | GroupActivitySetResolved
  423. | GroupActivitySetUnresolved
  424. | GroupActivitySetIgnored
  425. | GroupActivitySetByAge
  426. | GroupActivitySetByResolvedInRelease
  427. | GroupActivitySetByResolvedInNextSemverRelease
  428. | GroupActivitySetByResolvedInCommit
  429. | GroupActivitySetByResolvedInPullRequest
  430. | GroupActivityFirstSeen
  431. | GroupActivityMerge
  432. | GroupActivityReprocess
  433. | GroupActivityUnassigned
  434. | GroupActivityMarkReviewed
  435. | GroupActivityUnmergeDestination
  436. | GroupActivitySetPublic
  437. | GroupActivitySetPrivate
  438. | GroupActivityRegression
  439. | GroupActivityUnmergeSource
  440. | GroupActivityAssigned
  441. | GroupActivityCreateIssue
  442. | GroupActivityAutoSetOngoing
  443. | GroupActivitySetEscalating;
  444. export type Activity = GroupActivity;
  445. interface GroupFiltered {
  446. count: string;
  447. firstSeen: string;
  448. lastSeen: string;
  449. stats: Record<string, TimeseriesValue[]>;
  450. userCount: number;
  451. }
  452. export interface GroupStats extends GroupFiltered {
  453. filtered: GroupFiltered | null;
  454. id: string;
  455. // for issue alert previews, the last time a group triggered a rule
  456. lastTriggered?: string;
  457. lifetime?: GroupFiltered;
  458. sessionCount?: string | null;
  459. }
  460. export interface BaseGroupStatusReprocessing {
  461. status: 'reprocessing';
  462. statusDetails: {
  463. info: {
  464. dateCreated: string;
  465. totalEvents: number;
  466. } | null;
  467. pendingEvents: number;
  468. };
  469. }
  470. /**
  471. * Issue Resolution
  472. */
  473. export enum ResolutionStatus {
  474. RESOLVED = 'resolved',
  475. UNRESOLVED = 'unresolved',
  476. IGNORED = 'ignored',
  477. }
  478. export type ResolutionStatusDetails = {
  479. actor?: AvatarUser;
  480. autoResolved?: boolean;
  481. ignoreCount?: number;
  482. // Sent in requests. ignoreUntil is used in responses.
  483. ignoreDuration?: number;
  484. ignoreUntil?: string;
  485. ignoreUntilEscalating?: boolean;
  486. ignoreUserCount?: number;
  487. ignoreUserWindow?: number;
  488. ignoreWindow?: number;
  489. inCommit?: {
  490. commit?: string;
  491. dateCreated?: string;
  492. id?: string;
  493. repository?: string | Repository;
  494. };
  495. inNextRelease?: boolean;
  496. inRelease?: string;
  497. repository?: string;
  498. };
  499. export type GroupStatusResolution = {
  500. status: ResolutionStatus;
  501. statusDetails: ResolutionStatusDetails;
  502. substatus: GroupSubstatus | null;
  503. };
  504. // TODO(ts): incomplete
  505. export interface BaseGroup {
  506. activity: GroupActivity[];
  507. annotations: string[];
  508. assignedTo: Actor;
  509. culprit: string;
  510. firstSeen: string;
  511. hasSeen: boolean;
  512. id: string;
  513. isBookmarked: boolean;
  514. isPublic: boolean;
  515. isSubscribed: boolean;
  516. isUnhandled: boolean;
  517. issueCategory: IssueCategory;
  518. issueType: IssueType;
  519. lastSeen: string;
  520. latestEvent: Event;
  521. level: Level;
  522. logger: string;
  523. metadata: EventMetadata;
  524. numComments: number;
  525. participants: User[];
  526. permalink: string;
  527. platform: PlatformKey;
  528. pluginActions: any[]; // TODO(ts)
  529. pluginContexts: any[]; // TODO(ts)
  530. pluginIssues: any[]; // TODO(ts)
  531. project: Project;
  532. seenBy: User[];
  533. shareId: string;
  534. shortId: string;
  535. status: string;
  536. subscriptionDetails: {disabled?: boolean; reason?: string} | null;
  537. title: string;
  538. type: EventOrGroupType;
  539. userReportCount: number;
  540. inbox?: InboxDetails | null | false;
  541. owners?: SuggestedOwner[] | null;
  542. substatus?: GroupSubstatus;
  543. }
  544. export interface GroupReprocessing
  545. // BaseGroupStatusReprocessing status field (enum) incorrectly extends the BaseGroup status field (string) so we omit it.
  546. // A proper fix for this would be to make the status field an enum or string and correctly extend it.
  547. extends Omit<BaseGroup, 'status'>,
  548. GroupStats,
  549. BaseGroupStatusReprocessing {}
  550. export interface GroupResolution
  551. // GroupStatusResolution status field (enum) incorrectly extends the BaseGroup status field (string) so we omit it.
  552. // A proper fix for this would be to make the status field an enum or string and correctly extend it.
  553. extends Omit<BaseGroup, 'status'>,
  554. GroupStats,
  555. Omit<GroupStatusResolution, 'substatus'> {}
  556. export type Group = GroupResolution | GroupReprocessing;
  557. export interface GroupTombstone {
  558. actor: AvatarUser;
  559. culprit: string;
  560. id: string;
  561. level: Level;
  562. metadata: EventMetadata;
  563. type: EventOrGroupType;
  564. title?: string;
  565. }
  566. export interface GroupTombstoneHelper extends GroupTombstone {
  567. isTombstone: true;
  568. }
  569. export type ProcessingIssueItem = {
  570. checksum: string;
  571. data: {
  572. // TODO(ts) This type is likely incomplete, but this is what
  573. // project processing issues settings uses.
  574. _scope: string;
  575. image_arch: string;
  576. image_path: string;
  577. image_uuid: string;
  578. dist?: string;
  579. release?: string;
  580. };
  581. id: string;
  582. lastSeen: string;
  583. numEvents: number;
  584. type: string;
  585. };
  586. export type ProcessingIssue = {
  587. hasIssues: boolean;
  588. hasMoreResolveableIssues: boolean;
  589. issuesProcessing: number;
  590. lastSeen: string;
  591. numIssues: number;
  592. project: string;
  593. resolveableIssues: number;
  594. signedLink: string;
  595. issues?: ProcessingIssueItem[];
  596. };
  597. /**
  598. * Datascrubbing
  599. */
  600. export type Meta = {
  601. chunks: Array<ChunkType>;
  602. err: Array<MetaError>;
  603. len: number;
  604. rem: Array<MetaRemark>;
  605. };
  606. export type MetaError = string | [string, any];
  607. export type MetaRemark = Array<string | number>;
  608. export type ChunkType = {
  609. rule_id: string | number;
  610. text: string;
  611. type: string;
  612. remark?: string | number;
  613. };
  614. /**
  615. * User Feedback
  616. */
  617. export type UserReport = {
  618. comments: string;
  619. dateCreated: string;
  620. email: string;
  621. event: {eventID: string; id: string};
  622. eventID: string;
  623. id: string;
  624. issue: Group;
  625. name: string;
  626. user: User;
  627. };
  628. export type KeyValueListDataItem = {
  629. key: string;
  630. subject: string;
  631. actionButton?: React.ReactNode;
  632. isContextData?: boolean;
  633. isMultiValue?: boolean;
  634. meta?: Meta;
  635. subjectDataTestId?: string;
  636. subjectIcon?: React.ReactNode;
  637. value?: React.ReactNode;
  638. };
  639. export type KeyValueListData = KeyValueListDataItem[];
  640. // Response from ShortIdLookupEndpoint
  641. // /organizations/${orgId}/shortids/${query}/
  642. export type ShortIdResponse = {
  643. group: Group;
  644. groupId: string;
  645. organizationSlug: string;
  646. projectSlug: string;
  647. shortId: string;
  648. };
  649. /**
  650. * Note used in Group Activity and Alerts for users to comment
  651. */
  652. export type Note = {
  653. /**
  654. * Array of [id, display string] tuples used for @-mentions
  655. */
  656. mentions: [string, string][];
  657. /**
  658. * Note contents (markdown allowed)
  659. */
  660. text: string;
  661. };