project.tsx 6.2 KB

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