Possible working ETL
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import { apiClient } from '../../../core/api/client';
|
||||
import { Vehicle, CreateVehicleRequest, UpdateVehicleRequest, VINDecodeResponse } from '../types/vehicles.types';
|
||||
import { Vehicle, CreateVehicleRequest, UpdateVehicleRequest } from '../types/vehicles.types';
|
||||
|
||||
// All requests (including dropdowns) use authenticated apiClient
|
||||
|
||||
@@ -48,8 +48,8 @@ export const vehiclesApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getTransmissions: async (year: number, make: string, model: string): Promise<string[]> => {
|
||||
const response = await apiClient.get(`/vehicles/dropdown/transmissions?year=${year}&make=${encodeURIComponent(make)}&model=${encodeURIComponent(model)}`);
|
||||
getTransmissions: async (year: number, make: string, model: string, trim: string): Promise<string[]> => {
|
||||
const response = await apiClient.get(`/vehicles/dropdown/transmissions?year=${year}&make=${encodeURIComponent(make)}&model=${encodeURIComponent(model)}&trim=${encodeURIComponent(trim)}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -61,11 +61,5 @@ export const vehiclesApi = {
|
||||
getTrims: async (year: number, make: string, model: string): Promise<string[]> => {
|
||||
const response = await apiClient.get(`/vehicles/dropdown/trims?year=${year}&make=${encodeURIComponent(make)}&model=${encodeURIComponent(model)}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// VIN decode method - using unified platform endpoint
|
||||
decodeVIN: async (vin: string): Promise<VINDecodeResponse> => {
|
||||
const response = await apiClient.get(`/platform/vehicle?vin=${vin}`);
|
||||
return response.data;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user