services refactor
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user