project.tsx 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. import type {Scope, TimeseriesValue} from './core';
  2. import type {SDKUpdatesSuggestion} from './event';
  3. import type {Plugin} from './integrations';
  4. import type {Organization, Team} from './organization';
  5. import type {Deploy} from './release';
  6. import type {DynamicSamplingBias} from './sampling';
  7. // Minimal project representation for use with avatars.
  8. export type AvatarProject = {
  9. slug: string;
  10. id?: string | number;
  11. platform?: PlatformKey;
  12. };
  13. export type Project = {
  14. access: Scope[];
  15. allowedDomains: string[];
  16. dateCreated: string;
  17. digestsMaxDelay: number;
  18. digestsMinDelay: number;
  19. dynamicSamplingBiases: DynamicSamplingBias[] | null;
  20. environments: string[];
  21. eventProcessing: {
  22. symbolicationDegraded: boolean;
  23. };
  24. extrapolateMetrics: boolean;
  25. features: string[];
  26. firstEvent: string | null;
  27. firstTransactionEvent: boolean;
  28. groupingConfig: string;
  29. hasAccess: boolean;
  30. hasCustomMetrics: boolean;
  31. hasFeedbacks: boolean;
  32. hasInsightsAppStart: boolean;
  33. hasInsightsAssets: boolean;
  34. hasInsightsCaches: boolean;
  35. hasInsightsDb: boolean;
  36. hasInsightsHttp: boolean;
  37. hasInsightsLlmMonitoring: boolean;
  38. hasInsightsQueues: boolean;
  39. hasInsightsScreenLoad: boolean;
  40. hasInsightsVitals: boolean;
  41. hasMinifiedStackTrace: boolean;
  42. hasMonitors: boolean;
  43. hasNewFeedbacks: boolean;
  44. hasProfiles: boolean;
  45. hasReplays: boolean;
  46. hasSessions: boolean;
  47. id: string;
  48. isBookmarked: boolean;
  49. isInternal: boolean;
  50. isMember: boolean;
  51. name: string;
  52. organization: Organization;
  53. plugins: Plugin[];
  54. processingIssues: number;
  55. relayCustomMetricCardinalityLimit: number | null;
  56. relayPiiConfig: string;
  57. resolveAge: number;
  58. safeFields: string[];
  59. scrapeJavaScript: boolean;
  60. scrubIPAddresses: boolean;
  61. sensitiveFields: string[];
  62. subjectTemplate: string;
  63. team: Team;
  64. teams: Team[];
  65. verifySSL: boolean;
  66. builtinSymbolSources?: string[];
  67. defaultEnvironment?: string;
  68. hasUserReports?: boolean;
  69. highlightContext?: Record<string, string[]>;
  70. highlightPreset?: {
  71. context: Record<string, string[]>;
  72. tags: string[];
  73. };
  74. highlightTags?: string[];
  75. latestDeploys?: Record<string, Pick<Deploy, 'dateFinished' | 'version'>> | null;
  76. latestRelease?: {version: string} | null;
  77. options?: Record<string, boolean | string>;
  78. securityToken?: string;
  79. securityTokenHeader?: string;
  80. sessionStats?: {
  81. currentCrashFreeRate: number | null;
  82. hasHealthData: boolean;
  83. previousCrashFreeRate: number | null;
  84. };
  85. stats?: TimeseriesValue[];
  86. subjectPrefix?: string;
  87. symbolSources?: string;
  88. transactionStats?: TimeseriesValue[];
  89. } & AvatarProject;
  90. export type MinimalProject = Pick<Project, 'id' | 'slug' | 'platform'>;
  91. // Response from project_keys endpoints.
  92. export type ProjectKey = {
  93. browserSdk: {
  94. choices: [key: string, value: string][];
  95. };
  96. browserSdkVersion: ProjectKey['browserSdk']['choices'][number][0];
  97. dateCreated: string;
  98. dsn: {
  99. cdn: string;
  100. crons: string;
  101. csp: string;
  102. minidump: string;
  103. public: string;
  104. secret: string;
  105. security: string;
  106. unreal: string;
  107. };
  108. dynamicSdkLoaderOptions: {
  109. hasDebug: boolean;
  110. hasPerformance: boolean;
  111. hasReplay: boolean;
  112. };
  113. id: string;
  114. isActive: boolean;
  115. label: string;
  116. name: string;
  117. projectId: number;
  118. public: string;
  119. rateLimit: {
  120. count: number;
  121. window: number;
  122. } | null;
  123. secret: string;
  124. useCase?: string;
  125. };
  126. export type ProjectSdkUpdates = {
  127. projectId: string;
  128. sdkName: string;
  129. sdkVersion: string;
  130. suggestions: SDKUpdatesSuggestion[];
  131. };
  132. export type Environment = {
  133. displayName: string;
  134. id: string;
  135. name: string;
  136. // XXX: Provided by the backend but unused due to `getUrlRoutingName()`
  137. // urlRoutingName: string;
  138. };
  139. export interface TeamWithProjects extends Team {
  140. projects: Project[];
  141. }
  142. /**
  143. * The type of all platform keys.
  144. * Also includes platforms that cannot be created in the UI anymore.
  145. */
  146. export type PlatformKey =
  147. | 'android'
  148. | 'apple'
  149. | 'apple-ios'
  150. | 'apple-macos'
  151. | 'bun'
  152. | 'c'
  153. | 'capacitor'
  154. | 'cfml'
  155. | 'cocoa'
  156. | 'cocoa-objc'
  157. | 'cocoa-swift'
  158. | 'cordova'
  159. | 'csharp'
  160. | 'csharp-aspnetcore'
  161. | 'dart'
  162. | 'dart-flutter'
  163. | 'deno'
  164. | 'django'
  165. | 'dotnet'
  166. | 'dotnet-aspnet'
  167. | 'dotnet-aspnetcore'
  168. | 'dotnet-awslambda'
  169. | 'dotnet-gcpfunctions'
  170. | 'dotnet-google-cloud-functions'
  171. | 'dotnet-maui'
  172. | 'dotnet-uwp'
  173. | 'dotnet-winforms'
  174. | 'dotnet-wpf'
  175. | 'dotnet-xamarin'
  176. | 'electron'
  177. | 'elixir'
  178. | 'flutter'
  179. | 'go'
  180. | 'go-echo'
  181. | 'go-fasthttp'
  182. | 'go-fiber'
  183. | 'go-gin'
  184. | 'go-http'
  185. | 'go-iris'
  186. | 'go-martini'
  187. | 'go-negroni'
  188. | 'groovy'
  189. | 'ionic'
  190. | 'java'
  191. | 'java-android'
  192. | 'java-appengine'
  193. | 'java-log4j'
  194. | 'java-log4j2'
  195. | 'java-logback'
  196. | 'java-logging'
  197. | 'java-spring'
  198. | 'java-spring-boot'
  199. | 'javascript'
  200. | 'javascript-angular'
  201. | 'javascript-angularjs'
  202. | 'javascript-astro'
  203. | 'javascript-backbone'
  204. | 'javascript-browser'
  205. | 'javascript-capacitor'
  206. | 'javascript-cordova'
  207. | 'javascript-electron'
  208. | 'javascript-ember'
  209. | 'javascript-gatsby'
  210. | 'javascript-nextjs'
  211. | 'javascript-react'
  212. | 'javascript-remix'
  213. | 'javascript-solid'
  214. | 'javascript-svelte'
  215. | 'javascript-sveltekit'
  216. | 'javascript-vue'
  217. | 'kotlin'
  218. | 'minidump'
  219. | 'native'
  220. | 'native-crashpad'
  221. | 'native-breakpad'
  222. | 'native-minidump'
  223. | 'native-qt'
  224. | 'nintendo-switch'
  225. | 'node'
  226. | 'node-awslambda'
  227. | 'node-azurefunctions'
  228. | 'node-connect'
  229. | 'node-express'
  230. | 'node-fastify'
  231. | 'node-gcpfunctions'
  232. | 'node-hapi'
  233. | 'node-koa'
  234. | 'node-nestjs'
  235. | 'node-nodeawslambda'
  236. | 'node-nodegcpfunctions'
  237. | 'objc'
  238. | 'other'
  239. | 'perl'
  240. | 'php'
  241. | 'PHP'
  242. | 'php-laravel'
  243. | 'php-monolog'
  244. | 'php-symfony'
  245. | 'php-symfony2'
  246. | 'powershell'
  247. | 'python'
  248. | 'python-aiohttp'
  249. | 'python-asgi'
  250. | 'python-awslambda'
  251. | 'python-azurefunctions'
  252. | 'python-bottle'
  253. | 'python-celery'
  254. | 'python-chalice'
  255. | 'python-django'
  256. | 'python-falcon'
  257. | 'python-fastapi'
  258. | 'python-flask'
  259. | 'python-gcpfunctions'
  260. | 'python-pylons'
  261. | 'python-pymongo'
  262. | 'python-pyramid'
  263. | 'python-pythonawslambda'
  264. | 'python-pythonazurefunctions'
  265. | 'python-pythongcpfunctions'
  266. | 'python-pythonserverless'
  267. | 'python-quart'
  268. | 'python-rq'
  269. | 'python-sanic'
  270. | 'python-serverless'
  271. | 'python-starlette'
  272. | 'python-tornado'
  273. | 'python-tryton'
  274. | 'python-wsgi'
  275. | 'rails'
  276. | 'react'
  277. | 'react-native'
  278. | 'ruby'
  279. | 'ruby-rack'
  280. | 'ruby-rails'
  281. | 'rust'
  282. | 'swift'
  283. | 'switt'
  284. | 'unity'
  285. | 'unreal';
  286. export type PlatformIntegration = {
  287. id: PlatformKey;
  288. language: string;
  289. link: string | null;
  290. name: string;
  291. type: string;
  292. };