project.tsx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 {DynamicSamplingBias, 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. dynamicSamplingBiases: DynamicSamplingBias[];
  24. environments: string[];
  25. eventProcessing: {
  26. symbolicationDegraded: boolean;
  27. };
  28. features: string[];
  29. firstEvent: 'string' | null;
  30. firstTransactionEvent: boolean;
  31. groupingAutoUpdate: boolean;
  32. groupingConfig: string;
  33. hasAccess: boolean;
  34. hasProfiles: boolean;
  35. hasReplays: boolean;
  36. hasSessions: boolean;
  37. id: string;
  38. isBookmarked: boolean;
  39. isInternal: boolean;
  40. isMember: boolean;
  41. organization: Organization;
  42. plugins: Plugin[];
  43. processingIssues: number;
  44. relayPiiConfig: string;
  45. subjectTemplate: string;
  46. teams: Team[];
  47. builtinSymbolSources?: string[];
  48. hasUserReports?: boolean;
  49. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  50. latestRelease?: Release;
  51. /**
  52. * @deprecated Use project slug instead
  53. */
  54. name?: string;
  55. options?: Record<string, boolean | string>;
  56. sessionStats?: {
  57. currentCrashFreeRate: number | null;
  58. hasHealthData: boolean;
  59. previousCrashFreeRate: number | null;
  60. };
  61. stats?: TimeseriesValue[];
  62. symbolSources?: string;
  63. transactionStats?: TimeseriesValue[];
  64. } & AvatarProject;
  65. export type MinimalProject = Pick<Project, 'id' | 'slug' | 'platform'>;
  66. // Response from project_keys endpoints.
  67. export type ProjectKey = {
  68. browserSdk: {
  69. choices: [key: string, value: string][];
  70. };
  71. browserSdkVersion: string;
  72. dateCreated: string;
  73. dsn: {
  74. cdn: string;
  75. csp: string;
  76. minidump: string;
  77. public: string;
  78. secret: string;
  79. security: string;
  80. unreal: string;
  81. };
  82. id: string;
  83. isActive: boolean;
  84. label: string;
  85. name: string;
  86. projectId: string;
  87. public: string;
  88. rateLimit: {
  89. count: number;
  90. window: string;
  91. } | null;
  92. secret: string;
  93. };
  94. export type ProjectSdkUpdates = {
  95. projectId: string;
  96. sdkName: string;
  97. sdkVersion: string;
  98. suggestions: SDKUpdatesSuggestion[];
  99. };
  100. export type Environment = {
  101. displayName: string;
  102. id: string;
  103. name: string;
  104. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  105. // urlRoutingName: string;
  106. };
  107. export interface TeamWithProjects extends Team {
  108. projects: Project[];
  109. }
  110. export type PlatformIntegration = {
  111. id: PlatformKey;
  112. language: string;
  113. link: string | null;
  114. name: string;
  115. type: string;
  116. };