project.tsx 6.5 KB

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