website refactor

This commit is contained in:
2026-01-14 16:28:39 +01:00
parent 85e09b6f4d
commit 4b7d82ab43
119 changed files with 2403 additions and 1615 deletions

View File

@@ -1,17 +1,38 @@
import { Result } from '@/lib/contracts/Result';
import type { Service } from '@/lib/contracts/services/Service';
import type { GetLiveriesOutputDTO } from '@/lib/types/tbd/GetLiveriesOutputDTO';
/**
* Livery Service
*
* Currently not implemented - returns NotImplemented errors for all endpoints.
*
* Provides livery management functionality.
*/
export class LiveryService implements Service {
async getLiveries(): Promise<Result<void, 'NOT_IMPLEMENTED'>> {
return Result.err('NOT_IMPLEMENTED');
async getLiveries(driverId: string): Promise<Result<GetLiveriesOutputDTO, string>> {
// Mock data for now
const mockLiveries: GetLiveriesOutputDTO = {
liveries: [
{
id: 'livery-1',
name: 'Default Livery',
imageUrl: '/mock-livery-1.png',
createdAt: new Date().toISOString(),
isActive: true,
},
{
id: 'livery-2',
name: 'Custom Livery',
imageUrl: '/mock-livery-2.png',
createdAt: new Date(Date.now() - 86400000).toISOString(),
isActive: false,
},
],
};
return Result.ok(mockLiveries);
}
async uploadLivery(): Promise<Result<void, 'NOT_IMPLEMENTED'>> {
return Result.err('NOT_IMPLEMENTED');
async uploadLivery(driverId: string, file: File): Promise<Result<{ liveryId: string }, string>> {
// Mock implementation
return Result.ok({ liveryId: 'new-livery-id' });
}
}