Export Contract V1
Status
Section titled “Status”Draft. The TypeScript DTO foundation is defined in @sens-platform/contracts,
but export API endpoints and storage behavior are not implemented yet.
Purpose
Section titled “Purpose”Exports allow users to retrieve telemetry data as CSV.
V1 Decision
Section titled “V1 Decision”Exports should be asynchronous.
A user creates an export job. The platform processes the job in the background. The user can later download the result if authorized.
Supported Formats
Section titled “Supported Formats”V1:
csv
Future:
- JSON
- Parquet
- Excel if explicitly justified
Export Scope
Section titled “Export Scope”Exports must be scoped by:
- Tenant.
- Organization access.
- Device access.
- Time range.
- Measurement keys where relevant.
Typical Export Size
Section titled “Typical Export Size”Typical exports may cover up to one year of data.
Security
Section titled “Security”Users may only export data they are authorized to view.
Export creation and download should be audit logged.
TypeScript DTOs
Section titled “TypeScript DTOs”The draft DTO names are:
CreateTelemetryExportRequestDtoExportJobDtoExportJobResultDtoExportJobFailureDtoExportFormatExportJobStatus
ExportFormat is fixed to csv for V1.
ExportJobStatus currently allows:
queuedprocessingcompletedfailedexpired
The DTOs do not decide export file storage, retention, or download URL shape.
Open Decisions
Section titled “Open Decisions”- Maximum export range.
- Export retention.
- Export file storage.
- CSV column format.
- Compression.