website cleanup
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { BaseApiClient } from '../base/BaseApiClient';
|
||||
// Import generated types
|
||||
import type { CompleteOnboardingInputDTO, CompleteOnboardingOutputDTO, DriverRegistrationStatusDTO, DriverLeaderboardItemDTO, DriverProfileDTO, GetDriverOutputDTO } from '../../types/generated';
|
||||
import type { CompleteOnboardingInputDTO } from '../../types/generated/CompleteOnboardingInputDTO';
|
||||
import type { CompleteOnboardingOutputDTO } from '../../types/generated/CompleteOnboardingOutputDTO';
|
||||
import type { DriverRegistrationStatusDTO } from '../../types/generated/DriverRegistrationStatusDTO';
|
||||
import type { DriverLeaderboardItemDTO } from '../../types/generated/DriverLeaderboardItemDTO';
|
||||
import type { GetDriverOutputDTO } from '../../types/generated/GetDriverOutputDTO';
|
||||
import type { GetDriverProfileOutputDTO } from '../../types/generated/GetDriverProfileOutputDTO';
|
||||
|
||||
type DriversLeaderboardDto = {
|
||||
drivers: DriverLeaderboardItemDTO[];
|
||||
@@ -38,12 +42,12 @@ export class DriversApiClient extends BaseApiClient {
|
||||
}
|
||||
|
||||
/** Get driver profile with full details */
|
||||
getDriverProfile(driverId: string): Promise<DriverProfileDTO> {
|
||||
return this.get<DriverProfileDTO>(`/drivers/${driverId}/profile`);
|
||||
getDriverProfile(driverId: string): Promise<GetDriverProfileOutputDTO> {
|
||||
return this.get<GetDriverProfileOutputDTO>(`/drivers/${driverId}/profile`);
|
||||
}
|
||||
|
||||
/** Update current driver profile */
|
||||
updateProfile(updates: { bio?: string; country?: string }): Promise<GetDriverOutputDTO> {
|
||||
return this.put<GetDriverOutputDTO>('/drivers/profile', updates);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user