project.tsx 2.8 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 {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. environments: string[];
  24. eventProcessing: {
  25. symbolicationDegraded: boolean;
  26. };
  27. features: string[];
  28. firstEvent: 'string' | null;
  29. firstTransactionEvent: boolean;
  30. groupingAutoUpdate: boolean;
  31. groupingConfig: string;
  32. hasAccess: 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. hasUserReports?: boolean;
  46. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  47. latestRelease?: Release;
  48. name?: string;
  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. id: string;
  77. isActive: boolean;
  78. label: string;
  79. name: string;
  80. projectId: string;
  81. public: string;
  82. rateLimit: {
  83. count: number;
  84. window: string;
  85. } | null;
  86. secret: string;
  87. };
  88. export type ProjectSdkUpdates = {
  89. projectId: string;
  90. sdkName: string;
  91. sdkVersion: string;
  92. suggestions: SDKUpdatesSuggestion[];
  93. };
  94. export type Environment = {
  95. displayName: string;
  96. id: string;
  97. name: string;
  98. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  99. // urlRoutingName: string;
  100. };
  101. export type TeamWithProjects = Team & {projects: Project[]};
  102. export type PlatformIntegration = {
  103. id: PlatformKey;
  104. language: string;
  105. link: string | null;
  106. name: string;
  107. type: string;
  108. };