project.tsx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. hasProfiles: boolean;
  30. hasReplays: boolean;
  31. hasSessions: boolean;
  32. id: string;
  33. isBookmarked: boolean;
  34. isInternal: boolean;
  35. isMember: boolean;
  36. organization: Organization;
  37. plugins: Plugin[];
  38. processingIssues: number;
  39. relayPiiConfig: string;
  40. subjectTemplate: string;
  41. teams: Team[];
  42. builtinSymbolSources?: string[];
  43. dynamicSamplingRules?: DynamicSamplingRule[] | null;
  44. hasUserReports?: boolean;
  45. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  46. latestRelease?: Release;
  47. /**
  48. * @deprecated Use project slug instead
  49. */
  50. name?: string;
  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. id: string;
  79. isActive: boolean;
  80. label: string;
  81. name: string;
  82. projectId: string;
  83. public: string;
  84. rateLimit: {
  85. count: number;
  86. window: string;
  87. } | null;
  88. secret: string;
  89. };
  90. export type ProjectSdkUpdates = {
  91. projectId: string;
  92. sdkName: string;
  93. sdkVersion: string;
  94. suggestions: SDKUpdatesSuggestion[];
  95. };
  96. export type Environment = {
  97. displayName: string;
  98. id: string;
  99. name: string;
  100. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  101. // urlRoutingName: string;
  102. };
  103. export interface TeamWithProjects extends Team {
  104. projects: Project[];
  105. }
  106. export type PlatformIntegration = {
  107. id: PlatformKey;
  108. language: string;
  109. link: string | null;
  110. name: string;
  111. type: string;
  112. };