1
0
forked from Yara724/api
This commit is contained in:
2026-07-01 18:05:09 +03:30
parent b43f1a86dc
commit d525b8dd0d
6 changed files with 148 additions and 13 deletions

View File

@@ -1,8 +1,9 @@
import { Controller, Get, Param } from "@nestjs/common";
import { Controller, Get, Param, Query } from "@nestjs/common";
import {
ApiOkResponse,
ApiOperation,
ApiParam,
ApiQuery,
ApiTags,
} from "@nestjs/swagger";
import { LookupsService } from "./lookups.service";
@@ -171,6 +172,39 @@ export class LookupsController {
return await this.lookupsService.getExpertStatus();
}
@Get("vehicle-kinds")
@ApiOperation({
summary: "Fanavaran GEN.12 vehicle kind lookup",
description:
"Returns values for damage case payload field VehicleKindId from car/base-info/vehicle-kinds.",
})
@ApiOkResponse({
description: "Returns Fanavaran vehicle kinds lookup data",
schema: { type: "array", items: { type: "object" } },
})
async getVehicleKinds() {
return await this.lookupsService.getVehicleKinds();
}
@Get("inquiry-by-vin")
@ApiOperation({
summary: "Fanavaran vehicle inquiry by VIN",
description:
"Returns vehicle details from Fanavaran for the given VIN number via car/vehicles/inquiry-by-vin.",
})
@ApiQuery({
name: "vin",
description: "Vehicle Identification Number (VIN)",
example: "IRNKAEK4150012345",
})
@ApiOkResponse({
description: "Returns Fanavaran vehicle inquiry data for the VIN",
schema: { type: "object" },
})
async inquiryByVin(@Query("vin") vin: string) {
return await this.lookupsService.inquiryByVin(vin);
}
@Get("fanavaran")
@ApiOperation({
summary: "List configured Fanavaran remote lookups",