Skip to content

Commit

Permalink
Added serie field to the vehicle interface
Browse files Browse the repository at this point in the history
  • Loading branch information
souyahia-monk committed Oct 18, 2024
1 parent 4cec706 commit 914cad6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/network/src/api/inspection/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ function mapVehicle(response: ApiInspectionGet): Vehicle | undefined {
entityType: MonkEntityType.VEHICLE,
brand: response.vehicle.brand,
model: response.vehicle.model,
serie: response.vehicle.serie,
plate: response.vehicle.plate,
type: response.vehicle.vehicle_type,
mileageUnit: response.vehicle.mileage_unit as MileageUnit | undefined,
Expand Down Expand Up @@ -501,6 +502,7 @@ export function mapApiInspectionPost(options: CreateInspectionOptions): ApiInspe
? {
brand: options.vehicle.brand,
model: options.vehicle.model,
serie: options.vehicle.serie,
plate: options.vehicle.plate,
vehicle_type: options.vehicle.type,
mileage:
Expand Down
1 change: 1 addition & 0 deletions packages/network/src/api/models/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface ApiVehicleComponent {
mileage_unit?: ApiMileageUnit;
mileage_value?: number;
model?: string;
serie?: string;
owner_info?: ApiOwnerInfo;
plate?: string;
trade_in_offer?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"vehicle": {
"brand": "brand",
"model": "model",
"serie": "serie",
"plate": "plate",
"vehicle_type": "hatchback",
"mileage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
vehicle: {
brand: 'brand',
model: 'model',
serie: 'serie',
plate: 'plate',
type: 'hatchback',
mileageUnit: 'mileageUnit',
Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/state/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export interface Vehicle extends MonkEntity {
* The model of the vehicle.
*/
model?: string;
/**
* The serie / trim of the vehicle.
*/
serie?: string;
/**
* The license plate number of the vehicle.
*/
Expand Down

0 comments on commit 914cad6

Please sign in to comment.