project.tsx 3.0 KB

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