project.tsx 3.0 KB

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