web / lib/types/data-export-api
lib/types/data-export-api
Shared types for the data export API and its consumers.
These types describe the request/response shapes for the data export
endpoints (/api/data-exports and /api/data-exports/request). They
live here (rather than in the route files) so that both server and
client code can import them without creating a dependency from
hooks/components into route modules.
Interfaces
DataExport
A single data export record as returned by the API.
Properties
id
id:
number
status
status:
"failed"|"processing"|"pending"|"ready"|"expired"
requestedAt
requestedAt:
string
completedAt?
optionalcompletedAt:string|null
expiresAt?
optionalexpiresAt:string|null
fileSize?
optionalfileSize:number|null
downloadCount?
optionaldownloadCount:number|null
summary?
optionalsummary:ExportSummary|null
errorLog?
optionalerrorLog:string
ExportListResponse
Response format for the data exports list endpoint.
Properties
exports
exports:
DataExport[]
total
total:
number
RequestExportResponse
Response format for requesting a new data export.
Properties
message
message:
string
exportId
exportId:
number
summary
summary:
ExportSummary
RequestExportError
Error response shape for data export request failures.
Properties
error
error:
string
exportId?
optionalexportId:number
status?
optionalstatus:string
requestedAt?
optionalrequestedAt:string
resetTime?
optionalresetTime:string
failedWindow?
optionalfailedWindow:string