refactor(scan): Implement KV-backed scan station submissions and response model

This commit is contained in:
2026-02-20 19:36:38 +01:00
parent b0c6759813
commit d3e0206a3c
4 changed files with 171 additions and 32 deletions
@@ -0,0 +1,30 @@
import { IsBoolean, IsInt, IsNotEmpty, IsObject, IsString } from 'class-validator';
/**
* Lightweight response returned to scan stations after a TrackScan submission.
* Contains only what the scan display needs — validity, lap time, and runner info.
* Full ResponseTrackScan is still returned to JWT-authenticated admin/UI callers.
*/
export class ResponseScanIntakeRunner {
@IsString()
@IsNotEmpty()
displayName: string;
@IsInt()
totalDistance: number;
}
export class ResponseScanIntake {
@IsBoolean()
accepted: boolean;
@IsBoolean()
valid: boolean;
@IsInt()
lapTime: number;
@IsObject()
@IsNotEmpty()
runner: ResponseScanIntakeRunner;
}