chore: add OSRM-related type definitions for GPS routes

Adds distanceMethod to DriverStatsDto and LocationHistoryResponse interface
to support the OSRM road-snapping feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 17:05:43 +01:00
parent 33fda57cc6
commit 12b9361ae0
2 changed files with 10 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ export class DriverStatsDto {
averageSpeedMph: number;
totalTrips: number;
totalDrivingMinutes: number;
distanceMethod?: string; // 'osrm' or 'haversine'
};
recentLocations: LocationDataDto[];
}

View File

@@ -106,3 +106,12 @@ export interface MyGpsStatus {
lastActive?: string;
message?: string;
}
export interface LocationHistoryResponse {
matched: boolean;
coordinates?: [number, number][]; // road-snapped [lat, lng] pairs
distance?: number; // road distance in meters
duration?: number; // duration in seconds
confidence?: number; // 0-1 confidence score
rawPositions?: Array<{ latitude: number; longitude: number; speed: number; timestamp: Date }>;
}