project.tsx 3.0 KB

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