1
0
forked from Yara724/api

Merge pull request 'Added inner parts to APIs for expert claim' (#215) from s.yahyaee/yara724-api:main into main

Reviewed-on: Yara724/api#215
This commit is contained in:
2026-07-25 11:10:38 +03:30

View File

@@ -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)",