compile.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. export type PDFRange = {
  2. objectId: Uint8Array
  3. end: number
  4. hash: string
  5. size: number
  6. start: number
  7. totalUsage: number
  8. }
  9. type OutputFileBase = {
  10. path: string
  11. url: string
  12. type: string
  13. build: string
  14. downloadURL: string
  15. // assigned by buildFileList in frontend
  16. main?: boolean
  17. }
  18. export type PDFFile = OutputFileBase & {
  19. clsiCacheShard: string
  20. contentId: string
  21. createdAt: Date
  22. editorId: string
  23. pdfDownloadURL: string
  24. pdfURL: string
  25. prefetched: any[]
  26. preprocessed: boolean
  27. ranges: PDFRange[]
  28. size: number
  29. }
  30. export type CompileOutputFile = OutputFileBase | PDFFile
  31. export type CompileResponseData = {
  32. fromCache?: boolean
  33. status: string
  34. outputFiles: CompileOutputFile[]
  35. compileGroup?: string
  36. clsiServerId?: string
  37. clsiCacheShard?: string
  38. pdfDownloadDomain?: string
  39. pdfCachingMinChunkSize: number
  40. validationProblems: any
  41. stats: any
  42. timings: any
  43. outputFilesArchive?: CompileOutputFile
  44. // assigned on response body by DocumentCompiler in frontend
  45. rootDocId?: string | null
  46. options: CompileOptions
  47. }
  48. export type CompileOptions = {
  49. draft?: boolean
  50. stopOnFirstError?: boolean
  51. isAutoCompileOnLoad?: boolean
  52. isAutoCompileOnChange?: boolean
  53. rootResourcePath?: string
  54. imageName?: string
  55. compiler?: string
  56. }