project.tsx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. organization: Organization;
  39. plugins: Plugin[];
  40. processingIssues: number;
  41. relayPiiConfig: string;
  42. subjectTemplate: string;
  43. teams: Team[];
  44. builtinSymbolSources?: string[];
  45. dynamicSamplingRules?: DynamicSamplingRule[] | null;
  46. hasUserReports?: boolean;
  47. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  48. latestRelease?: Release;
  49. options?: Record<string, boolean | string>;
  50. sessionStats?: {
  51. currentCrashFreeRate: number | null;
  52. hasHealthData: boolean;
  53. previousCrashFreeRate: number | null;
  54. };
  55. stats?: TimeseriesValue[];
  56. symbolSources?: string;
  57. transactionStats?: TimeseriesValue[];
  58. } & AvatarProject;
  59. export type MinimalProject = Pick<Project, 'id' | 'slug' | 'platform'>;
  60. // Response from project_keys endpoints.
  61. export type ProjectKey = {
  62. browserSdk: {
  63. choices: [key: string, value: string][];
  64. };
  65. browserSdkVersion: string;
  66. dateCreated: string;
  67. dsn: {
  68. cdn: string;
  69. csp: string;
  70. minidump: string;
  71. public: string;
  72. secret: string;
  73. security: string;
  74. unreal: string;
  75. };
  76. dynamicSdkLoaderOptions: {
  77. hasDebug: boolean;
  78. hasPerformance: boolean;
  79. hasReplay: boolean;
  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. };