project.tsx 2.9 KB

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