group.tsx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  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. version?: string;
  293. };
  294. type: GroupActivityType.SET_REGRESSION;
  295. }
  296. export interface GroupActivitySetByResolvedInNextSemverRelease extends GroupActivityBase {
  297. data: {
  298. // Set for semver releases
  299. current_release_version: string;
  300. };
  301. type: GroupActivityType.SET_RESOLVED_IN_RELEASE;
  302. }
  303. export interface GroupActivitySetByResolvedInRelease extends GroupActivityBase {
  304. data: {
  305. version?: string;
  306. };
  307. type: GroupActivityType.SET_RESOLVED_IN_RELEASE;
  308. }
  309. interface GroupActivitySetByResolvedInCommit extends GroupActivityBase {
  310. data: {
  311. commit?: Commit;
  312. };
  313. type: GroupActivityType.SET_RESOLVED_IN_COMMIT;
  314. }
  315. interface GroupActivitySetByResolvedInPullRequest extends GroupActivityBase {
  316. data: {
  317. pullRequest?: PullRequest;
  318. };
  319. type: GroupActivityType.SET_RESOLVED_IN_PULL_REQUEST;
  320. }
  321. export interface GroupActivitySetIgnored extends GroupActivityBase {
  322. data: {
  323. ignoreCount?: number;
  324. ignoreDuration?: number;
  325. ignoreUntil?: string;
  326. /** Archived until escalating */
  327. ignoreUntilEscalating?: boolean;
  328. ignoreUserCount?: number;
  329. ignoreUserWindow?: number;
  330. ignoreWindow?: number;
  331. };
  332. type: GroupActivityType.SET_IGNORED;
  333. }
  334. export interface GroupActivityReprocess extends GroupActivityBase {
  335. data: {
  336. eventCount: number;
  337. newGroupId: number;
  338. oldGroupId: number;
  339. };
  340. type: GroupActivityType.REPROCESS;
  341. }
  342. interface GroupActivityUnmergeDestination extends GroupActivityBase {
  343. data: {
  344. fingerprints: Array<string>;
  345. source?: {
  346. id: string;
  347. shortId: string;
  348. };
  349. };
  350. type: GroupActivityType.UNMERGE_DESTINATION;
  351. }
  352. interface GroupActivityUnmergeSource extends GroupActivityBase {
  353. data: {
  354. fingerprints: Array<string>;
  355. destination?: {
  356. id: string;
  357. shortId: string;
  358. };
  359. };
  360. type: GroupActivityType.UNMERGE_SOURCE;
  361. }
  362. interface GroupActivityMerge extends GroupActivityBase {
  363. data: {
  364. issues: Array<any>;
  365. };
  366. type: GroupActivityType.MERGE;
  367. }
  368. interface GroupActivityAutoSetOngoing extends GroupActivityBase {
  369. data: {
  370. afterDays?: number;
  371. };
  372. type: GroupActivityType.AUTO_SET_ONGOING;
  373. }
  374. export interface GroupActivitySetEscalating extends GroupActivityBase {
  375. data: {
  376. expired_snooze?: {
  377. count: number | null;
  378. until: Date | null;
  379. user_count: number | null;
  380. user_window: number | null;
  381. window: number | null;
  382. };
  383. forecast?: number;
  384. };
  385. type: GroupActivityType.SET_ESCALATING;
  386. }
  387. export interface GroupActivityAssigned extends GroupActivityBase {
  388. data: {
  389. assignee: string;
  390. assigneeType: string;
  391. user: Team | User;
  392. assigneeEmail?: string;
  393. /**
  394. * If the user was assigned via an integration
  395. */
  396. integration?: 'projectOwnership' | 'codeowners' | 'slack' | 'msteams';
  397. /** Codeowner or Project owner rule as a string */
  398. rule?: string;
  399. };
  400. type: GroupActivityType.ASSIGNED;
  401. }
  402. export interface GroupActivityCreateIssue extends GroupActivityBase {
  403. data: {
  404. location: string;
  405. provider: string;
  406. title: string;
  407. };
  408. type: GroupActivityType.CREATE_ISSUE;
  409. }
  410. export type GroupActivity =
  411. | GroupActivityNote
  412. | GroupActivitySetResolved
  413. | GroupActivitySetUnresolved
  414. | GroupActivitySetIgnored
  415. | GroupActivitySetByAge
  416. | GroupActivitySetByResolvedInRelease
  417. | GroupActivitySetByResolvedInNextSemverRelease
  418. | GroupActivitySetByResolvedInCommit
  419. | GroupActivitySetByResolvedInPullRequest
  420. | GroupActivityFirstSeen
  421. | GroupActivityMerge
  422. | GroupActivityReprocess
  423. | GroupActivityUnassigned
  424. | GroupActivityMarkReviewed
  425. | GroupActivityUnmergeDestination
  426. | GroupActivitySetPublic
  427. | GroupActivitySetPrivate
  428. | GroupActivityRegression
  429. | GroupActivityUnmergeSource
  430. | GroupActivityAssigned
  431. | GroupActivityCreateIssue
  432. | GroupActivityAutoSetOngoing
  433. | GroupActivitySetEscalating;
  434. export type Activity = GroupActivity;
  435. interface GroupFiltered {
  436. count: string;
  437. firstSeen: string;
  438. lastSeen: string;
  439. stats: Record<string, TimeseriesValue[]>;
  440. userCount: number;
  441. }
  442. export interface GroupStats extends GroupFiltered {
  443. filtered: GroupFiltered | null;
  444. id: string;
  445. // for issue alert previews, the last time a group triggered a rule
  446. lastTriggered?: string;
  447. lifetime?: GroupFiltered;
  448. sessionCount?: string | null;
  449. }
  450. export interface BaseGroupStatusReprocessing {
  451. status: 'reprocessing';
  452. statusDetails: {
  453. info: {
  454. dateCreated: string;
  455. totalEvents: number;
  456. } | null;
  457. pendingEvents: number;
  458. };
  459. }
  460. /**
  461. * Issue Resolution
  462. */
  463. export enum ResolutionStatus {
  464. RESOLVED = 'resolved',
  465. UNRESOLVED = 'unresolved',
  466. IGNORED = 'ignored',
  467. }
  468. export type ResolutionStatusDetails = {
  469. actor?: AvatarUser;
  470. autoResolved?: boolean;
  471. ignoreCount?: number;
  472. // Sent in requests. ignoreUntil is used in responses.
  473. ignoreDuration?: number;
  474. ignoreUntil?: string;
  475. ignoreUntilEscalating?: boolean;
  476. ignoreUserCount?: number;
  477. ignoreUserWindow?: number;
  478. ignoreWindow?: number;
  479. inCommit?: {
  480. commit?: string;
  481. dateCreated?: string;
  482. id?: string;
  483. repository?: string | Repository;
  484. };
  485. inNextRelease?: boolean;
  486. inRelease?: string;
  487. repository?: string;
  488. };
  489. export type GroupStatusResolution = {
  490. status: ResolutionStatus;
  491. statusDetails: ResolutionStatusDetails;
  492. substatus?: GroupSubstatus;
  493. };
  494. // TODO(ts): incomplete
  495. export interface BaseGroup {
  496. activity: GroupActivity[];
  497. annotations: string[];
  498. assignedTo: Actor;
  499. culprit: string;
  500. firstSeen: string;
  501. hasSeen: boolean;
  502. id: string;
  503. isBookmarked: boolean;
  504. isPublic: boolean;
  505. isSubscribed: boolean;
  506. isUnhandled: boolean;
  507. issueCategory: IssueCategory;
  508. issueType: IssueType;
  509. lastSeen: string;
  510. latestEvent: Event;
  511. level: Level;
  512. logger: string;
  513. metadata: EventMetadata;
  514. numComments: number;
  515. participants: User[];
  516. permalink: string;
  517. platform: PlatformKey;
  518. pluginActions: any[]; // TODO(ts)
  519. pluginContexts: any[]; // TODO(ts)
  520. pluginIssues: any[]; // TODO(ts)
  521. project: Project;
  522. seenBy: User[];
  523. shareId: string;
  524. shortId: string;
  525. status: string;
  526. subscriptionDetails: {disabled?: boolean; reason?: string} | null;
  527. title: string;
  528. type: EventOrGroupType;
  529. userReportCount: number;
  530. inbox?: InboxDetails | null | false;
  531. owners?: SuggestedOwner[] | null;
  532. substatus?: GroupSubstatus;
  533. }
  534. export interface GroupReprocessing
  535. // BaseGroupStatusReprocessing status field (enum) incorrectly extends the BaseGroup status field (string) so we omit it.
  536. // A proper fix for this would be to make the status field an enum or string and correctly extend it.
  537. extends Omit<BaseGroup, 'status'>,
  538. GroupStats,
  539. BaseGroupStatusReprocessing {}
  540. export interface GroupResolution
  541. // GroupStatusResolution status field (enum) incorrectly extends the BaseGroup status field (string) so we omit it.
  542. // A proper fix for this would be to make the status field an enum or string and correctly extend it.
  543. extends Omit<BaseGroup, 'status'>,
  544. GroupStats,
  545. GroupStatusResolution {}
  546. export type Group = GroupResolution | GroupReprocessing;
  547. export interface GroupTombstone {
  548. actor: AvatarUser;
  549. culprit: string;
  550. id: string;
  551. level: Level;
  552. metadata: EventMetadata;
  553. type: EventOrGroupType;
  554. title?: string;
  555. }
  556. export interface GroupTombstoneHelper extends GroupTombstone {
  557. isTombstone: true;
  558. }
  559. export type ProcessingIssueItem = {
  560. checksum: string;
  561. data: {
  562. // TODO(ts) This type is likely incomplete, but this is what
  563. // project processing issues settings uses.
  564. _scope: string;
  565. image_arch: string;
  566. image_path: string;
  567. image_uuid: string;
  568. dist?: string;
  569. release?: string;
  570. };
  571. id: string;
  572. lastSeen: string;
  573. numEvents: number;
  574. type: string;
  575. };
  576. export type ProcessingIssue = {
  577. hasIssues: boolean;
  578. hasMoreResolveableIssues: boolean;
  579. issuesProcessing: number;
  580. lastSeen: string;
  581. numIssues: number;
  582. project: string;
  583. resolveableIssues: number;
  584. signedLink: string;
  585. issues?: ProcessingIssueItem[];
  586. };
  587. /**
  588. * Datascrubbing
  589. */
  590. export type Meta = {
  591. chunks: Array<ChunkType>;
  592. err: Array<MetaError>;
  593. len: number;
  594. rem: Array<MetaRemark>;
  595. };
  596. export type MetaError = string | [string, any];
  597. export type MetaRemark = Array<string | number>;
  598. export type ChunkType = {
  599. rule_id: string | number;
  600. text: string;
  601. type: string;
  602. remark?: string | number;
  603. };
  604. /**
  605. * User Feedback
  606. */
  607. export type UserReport = {
  608. comments: string;
  609. dateCreated: string;
  610. email: string;
  611. event: {eventID: string; id: string};
  612. eventID: string;
  613. id: string;
  614. issue: Group;
  615. name: string;
  616. user: User;
  617. };
  618. export type KeyValueListDataItem = {
  619. key: string;
  620. subject: string;
  621. actionButton?: React.ReactNode;
  622. isContextData?: boolean;
  623. isMultiValue?: boolean;
  624. meta?: Meta;
  625. subjectDataTestId?: string;
  626. subjectIcon?: React.ReactNode;
  627. value?: React.ReactNode;
  628. };
  629. export type KeyValueListData = KeyValueListDataItem[];
  630. // Response from ShortIdLookupEndpoint
  631. // /organizations/${orgId}/shortids/${query}/
  632. export type ShortIdResponse = {
  633. group: Group;
  634. groupId: string;
  635. organizationSlug: string;
  636. projectSlug: string;
  637. shortId: string;
  638. };
  639. /**
  640. * Note used in Group Activity and Alerts for users to comment
  641. */
  642. export type Note = {
  643. /**
  644. * Array of [id, display string] tuples used for @-mentions
  645. */
  646. mentions: [string, string][];
  647. /**
  648. * Note contents (markdown allowed)
  649. */
  650. text: string;
  651. };