Merge pull request #27989 from overleaf/dp-pdf-caching-transport

Re-convert pdf-caching-transport to typescript

GitOrigin-RevId: f0033afd5d46bc1da00a0d815b946225a804ca19
This commit is contained in:
David
2025-08-20 08:05:38 +00:00
committed by Copybot
parent f183a1dfbc
commit a5718b86b9
4 changed files with 88 additions and 26 deletions
+26 -10
View File
@@ -1,22 +1,38 @@
export type CompileOutputFile = {
export type PDFRange = {
objectId: Uint8Array
end: number
hash: string
size: number
start: number
totalUsage: number
}
type OutputFileBase = {
path: string
url: string
downloadURL?: string
type: string
build: string
ranges?: {
start: number
end: number
hash: string
objectId: string
}[]
contentId?: string
size?: number
downloadURL: string
// assigned by buildFileList in frontend
main?: boolean
}
export type PDFFile = OutputFileBase & {
clsiCacheShard: string
contentId: string
createdAt: Date
editorId: string
pdfDownloadURL: string
pdfURL: string
prefetched: any[]
preprocessed: boolean
ranges: PDFRange[]
size: number
}
export type CompileOutputFile = OutputFileBase | PDFFile
export type CompileResponseData = {
fromCache?: boolean
status: string