services refactor

This commit is contained in:
2025-12-17 22:37:21 +01:00
parent 055a7f67b5
commit 6123264353
117 changed files with 5617 additions and 117 deletions

View File

@@ -1,11 +1,10 @@
import { BaseApiClient } from '../base/BaseApiClient';
import type {
DriversLeaderboardDto,
CompleteOnboardingInputDto,
CompleteOnboardingOutputDto,
DriverDto,
DriverRegistrationStatusDto,
} from '../../dtos';
// Import generated types
import type { DriverDTO, CompleteOnboardingInputDTO, CompleteOnboardingOutputDTO } from '../../types/api-helpers';
/**
* Drivers API Client
@@ -19,12 +18,12 @@ export class DriversApiClient extends BaseApiClient {
}
/** Complete driver onboarding */
completeOnboarding(input: CompleteOnboardingInputDto): Promise<CompleteOnboardingOutputDto> {
completeOnboarding(input: CompleteOnboardingInputDTO): Promise<CompleteOnboardingOutputDTO> {
return this.post<CompleteOnboardingOutputDto>('/drivers/complete-onboarding', input);
}
/** Get current driver (based on session) */
getCurrent(): Promise<DriverDto | null> {
getCurrent(): Promise<DriverDTO | null> {
return this.get<DriverDto | null>('/drivers/current');
}