project.tsx 5.5 KB

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