project.tsx 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import type {PlatformKey} from 'sentry/data/platformCategories';
  2. import type {TimeseriesValue} from './core';
  3. import type {SDKUpdatesSuggestion} from './event';
  4. import type {Plugin} from './integrations';
  5. import type {Organization, Team} from './organization';
  6. import type {Deploy, Release} from './release';
  7. import type {SamplingRule} from './sampling';
  8. // Minimal project representation for use with avatars.
  9. export type AvatarProject = {
  10. slug: string;
  11. id?: string | number;
  12. platform?: PlatformKey;
  13. };
  14. export type Project = {
  15. dateCreated: string;
  16. digestsMaxDelay: number;
  17. digestsMinDelay: number;
  18. // XXX: These are part of the DetailedProject serializer
  19. dynamicSampling: {
  20. next_id: number;
  21. rules: SamplingRule[];
  22. } | null;
  23. environments: string[];
  24. eventProcessing: {
  25. symbolicationDegraded: boolean;
  26. };
  27. features: string[];
  28. firstEvent: 'string' | null;
  29. firstTransactionEvent: boolean;
  30. groupingAutoUpdate: boolean;
  31. groupingConfig: string;
  32. hasAccess: boolean;
  33. hasProfiles: boolean;
  34. hasSessions: boolean;
  35. id: string;
  36. isBookmarked: boolean;
  37. isInternal: boolean;
  38. isMember: boolean;
  39. organization: Organization;
  40. plugins: Plugin[];
  41. processingIssues: number;
  42. relayPiiConfig: string;
  43. subjectTemplate: string;
  44. teams: Team[];
  45. builtinSymbolSources?: string[];
  46. hasUserReports?: boolean;
  47. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  48. latestRelease?: Release;
  49. name?: string;
  50. options?: Record<string, boolean | string>;
  51. sessionStats?: {
  52. currentCrashFreeRate: number | null;
  53. hasHealthData: boolean;
  54. previousCrashFreeRate: number | null;
  55. };
  56. stats?: TimeseriesValue[];
  57. symbolSources?: string;
  58. transactionStats?: TimeseriesValue[];
  59. } & AvatarProject;
  60. export type MinimalProject = Pick<Project, 'id' | 'slug' | 'platform'>;
  61. // Response from project_keys endpoints.
  62. export type ProjectKey = {
  63. browserSdk: {
  64. choices: [key: string, value: string][];
  65. };
  66. browserSdkVersion: string;
  67. dateCreated: string;
  68. dsn: {
  69. cdn: string;
  70. csp: string;
  71. minidump: string;
  72. public: string;
  73. secret: string;
  74. security: string;
  75. unreal: string;
  76. };
  77. id: string;
  78. isActive: boolean;
  79. label: string;
  80. name: string;
  81. projectId: string;
  82. public: string;
  83. rateLimit: {
  84. count: number;
  85. window: string;
  86. } | null;
  87. secret: string;
  88. };
  89. export type ProjectSdkUpdates = {
  90. projectId: string;
  91. sdkName: string;
  92. sdkVersion: string;
  93. suggestions: SDKUpdatesSuggestion[];
  94. };
  95. export type Environment = {
  96. displayName: string;
  97. id: string;
  98. name: string;
  99. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  100. // urlRoutingName: string;
  101. };
  102. export interface TeamWithProjects extends Team {
  103. projects: Project[];
  104. }
  105. export type PlatformIntegration = {
  106. id: PlatformKey;
  107. language: string;
  108. link: string | null;
  109. name: string;
  110. type: string;
  111. };