project.tsx 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import {PlatformKey} from 'sentry/data/platformCategories';
  2. import {TimeseriesValue} from './core';
  3. import {DynamicSamplingRules} from './dynamicSampling';
  4. import {SDKUpdatesSuggestion} from './event';
  5. import {Plugin} from './integrations';
  6. import {Organization, Team} from './organization';
  7. import {Deploy, Release} from './release';
  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: DynamicSamplingRules;
  22. } | null;
  23. environments: string[];
  24. eventProcessing: {
  25. symbolicationDegraded: boolean;
  26. };
  27. features: string[];
  28. firstEvent: 'string' | null;
  29. firstTransactionEvent: boolean;
  30. groupingConfig: string;
  31. hasAccess: 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. hasUserReports?: boolean;
  45. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  46. latestRelease?: Release;
  47. options?: Record<string, boolean | string>;
  48. sessionStats?: {
  49. currentCrashFreeRate: number | null;
  50. hasHealthData: boolean;
  51. previousCrashFreeRate: number | null;
  52. };
  53. stats?: TimeseriesValue[];
  54. symbolSources?: string;
  55. transactionStats?: TimeseriesValue[];
  56. } & AvatarProject;
  57. export type MinimalProject = Pick<Project, 'id' | 'slug' | 'platform'>;
  58. // Response from project_keys endpoints.
  59. export type ProjectKey = {
  60. browserSdk: {
  61. choices: [key: string, value: string][];
  62. };
  63. browserSdkVersion: string;
  64. dateCreated: string;
  65. dsn: {
  66. cdn: string;
  67. csp: string;
  68. minidump: string;
  69. public: string;
  70. secret: string;
  71. security: string;
  72. unreal: string;
  73. };
  74. id: string;
  75. isActive: boolean;
  76. label: string;
  77. name: string;
  78. projectId: string;
  79. public: string;
  80. rateLimit: {
  81. count: number;
  82. window: string;
  83. } | null;
  84. secret: string;
  85. };
  86. export type ProjectSdkUpdates = {
  87. projectId: string;
  88. sdkName: string;
  89. sdkVersion: string;
  90. suggestions: SDKUpdatesSuggestion[];
  91. };
  92. export type Environment = {
  93. displayName: string;
  94. id: string;
  95. name: string;
  96. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  97. // urlRoutingName: string;
  98. };
  99. export type TeamWithProjects = Team & {projects: Project[]};
  100. export type PlatformIntegration = {
  101. id: string;
  102. language: string;
  103. link: string | null;
  104. name: string;
  105. type: string;
  106. };