Files
pdf/gateway/app/schemas/document.py
T
2026-06-29 10:51:04 +05:30

51 lines
1.0 KiB
Python

from pydantic import BaseModel
class PageInfoResponse(BaseModel):
index: int
width: float
height: float
class PermissionsResponse(BaseModel):
isEncrypted: bool = False
encryption: str = "None"
securityRevision: int = -1
ownerUnlocked: bool = False
canPrint: bool = True
canPrintHighRes: bool = True
canModify: bool = True
canCopy: bool = True
canAnnotate: bool = True
canFillForms: bool = True
canExtractForAccessibility: bool = True
canAssemble: bool = True
class DocumentInfoResponse(BaseModel):
id: str
filename: str
sizeBytes: int
totalPages: int
pageWidth: float
pageHeight: float
uploadedAt: str
status: str
pages: list[PageInfoResponse] = []
permissions: PermissionsResponse = PermissionsResponse()
class DocumentMetadataResponse(BaseModel):
title: str
author: str
creator: str
producer: str
creation_date: str
modification_date: str
class OutlineItemResponse(BaseModel):
title: str
pageIndex: int
level: int