project.tsx 5.9 KB

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