window.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { ExposedSettings } from './exposed-settings'
  2. import { OAuthProviders } from './oauth-providers'
  3. import { OverallThemeMeta } from './project-settings'
  4. import { User } from './user'
  5. import 'recurly__recurly-js'
  6. import { UserSettings } from '@/features/editor-left-menu/utils/api'
  7. declare global {
  8. // eslint-disable-next-line no-unused-vars
  9. interface Window {
  10. csrfToken: string
  11. user: User
  12. user_id?: string
  13. userSettings: UserSettings
  14. oauthProviders: OAuthProviders
  15. thirdPartyIds: Record<string, string>
  16. metaAttributesCache: Map<string, any>
  17. i18n: {
  18. currentLangCode: string
  19. }
  20. ExposedSettings: ExposedSettings
  21. project_id: string
  22. gitBridgePublicBaseUrl: string
  23. _ide: Record<string, unknown> & {
  24. $scope: Record<string, unknown> & {
  25. pdf?: {
  26. logEntryAnnotations: Record<string, unknown>
  27. }
  28. }
  29. }
  30. isRestrictedTokenMember: boolean
  31. _reportCM6Perf: () => void
  32. _reportAcePerf: () => void
  33. MathJax: Record<string, any>
  34. overallThemes: OverallThemeMeta[]
  35. crypto: {
  36. randomUUID: () => string
  37. }
  38. // For react-google-recaptcha
  39. recaptchaOptions?: {
  40. enterprise?: boolean
  41. useRecaptchaNet?: boolean
  42. }
  43. expectingLinkedFileRefreshedSocketFor?: string | null
  44. }
  45. }