diff --git a/src/expert-claim/expert-claim.v2.controller.ts b/src/expert-claim/expert-claim.v2.controller.ts index 410bd8b..b1e8735 100644 --- a/src/expert-claim/expert-claim.v2.controller.ts +++ b/src/expert-claim/expert-claim.v2.controller.ts @@ -1,3 +1,4 @@ +import { readFile } from "node:fs/promises"; import { Body, Controller, @@ -117,6 +118,21 @@ export class ExpertClaimV2Controller { return this.claimRequestManagementService.getOuterPartsCatalogV2(carType); } + @Get("inner-parts-catalog") + @ApiOperation({ + summary: "Get inner parts catalog", + description: "Returns the full list of inner car parts from the static catalog.", + }) + @ApiResponse({ status: 200, description: "Inner parts catalog (object keyed by part name)" }) + async getInnerPartsCatalog() { + const raw = await readFile(`${process.cwd()}/src/static/car-part.json`, "utf-8"); + try { + return JSON.parse(raw); + } catch { + return raw; + } + } + @Get("branches") @ApiOperation({ summary: "List insurer branches for this damage expert (V2)",