fix: harden claim review and inquiry workflows

Preserve damage history and current vehicle price, restore depreciation mapping, normalize inquiry/report output, and support resumable expert review with paginated case retrieval.
This commit is contained in:
2026-09-18 16:04:33 +03:30
parent a84d83a135
commit 7d1a50db7b
38 changed files with 2345 additions and 370 deletions

View File

@@ -74,7 +74,7 @@ describe("inquiry participant resolver", () => {
},
vin: "NAAM01E15HK123456",
}),
).toThrow("previousPolicyholderNationalCode");
).toThrow("کد ملی بیمه‌گذار قبلی");
});
it("defaults an omitted registration state to CURRENT", () => {
@@ -102,7 +102,7 @@ describe("inquiry participant resolver", () => {
},
vin: "TOO-SHORT",
}),
).toThrow("vehicle.vin must contain exactly 17 characters.");
).toThrow("شماره شاسی (VIN) باید دقیقاً ۱۷ کاراکتر باشد.");
});
it("rejects an incomplete current plate", () => {
@@ -115,7 +115,7 @@ describe("inquiry participant resolver", () => {
ir: "22",
},
}),
).toThrow("vehicle.currentPlate.centerDigits is required.");
).toThrow("سه رقم میانی پلاک در پلاک فعلی الزامی است.");
});
it("rejects invalid vehicle choice values", () => {
@@ -129,7 +129,7 @@ describe("inquiry participant resolver", () => {
ir: "22",
},
}),
).toThrow("vehicle.registrationState must be CURRENT or RECENTLY_TRANSFERRED.");
).toThrow("وضعیت پلاک خودرو باید «فعلی» یا «تازه تعویض‌شده» باشد.");
expect(() =>
resolveInquiryVehicle({
@@ -141,7 +141,7 @@ describe("inquiry participant resolver", () => {
},
isNewCar: "false" as any,
}),
).toThrow("vehicle.isNewCar must be a boolean.");
).toThrow("وضعیت صفر بودن خودرو نامعتبر است.");
});
it("rejects a previous policyholder national code for a current registration", () => {
@@ -647,7 +647,7 @@ describe("inquiry participant resolver", () => {
expect(() =>
resolveInquiryParticipants(BlameRequestType.THIRD_PARTY, input as any),
).toThrow("THIRD_PARTY_POLICYHOLDER does not support the unknown option.");
).toThrow("ثبت بیمه‌گذار شخص ثالث به‌صورت نامشخص امکان‌پذیر نیست.");
});
it("strips the removed unknown field from historical participant output", () => {