project.tsx 5.8 KB

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