project.tsx 6.1 KB

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