From ea4fcbe713f26306f83917b5ff9b4b4c4acb0e8a Mon Sep 17 00:00:00 2001 From: SepehrYahyaee <7heycallmegray@gmail.com> Date: Wed, 29 Jul 2026 14:23:13 +0330 Subject: [PATCH] Returning missing objects from v5 --- src/expert-claim/dto/claim-detail-v2.dto.ts | 19 +++++++++++++++++++ src/expert-claim/expert-claim.service.ts | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/src/expert-claim/dto/claim-detail-v2.dto.ts b/src/expert-claim/dto/claim-detail-v2.dto.ts index 83e8cf2..817edf9 100644 --- a/src/expert-claim/dto/claim-detail-v2.dto.ts +++ b/src/expert-claim/dto/claim-detail-v2.dto.ts @@ -138,6 +138,25 @@ export class ClaimDetailV2ResponseDto { }) requiresFileMakerApproval?: boolean; + @ApiPropertyOptional({ + description: + "V5 only. Number of times the FileMaker has rejected this claim (0–2). When 2, the next action must be approval.", + example: 1, + }) + fileMakerRejectionCount?: number; + + @ApiPropertyOptional({ + description: "V5 only. Reason text from the most recent FileMaker rejection.", + example: "قیمت نامعقول", + }) + fileMakerRejectionReason?: string; + + @ApiPropertyOptional({ + description: "V5 only. ObjectId of the FileMaker who must approve (or has approved) this claim.", + example: "6a43a2689faee3d20bf24030", + }) + fileMakerApprovalActorId?: string; + @ApiPropertyOptional({ description: "Slice of `claim.evaluation` exposed to the damage expert. " + diff --git a/src/expert-claim/expert-claim.service.ts b/src/expert-claim/expert-claim.service.ts index 83810d6..e27b3ca 100644 --- a/src/expert-claim/expert-claim.service.ts +++ b/src/expert-claim/expert-claim.service.ts @@ -5105,6 +5105,11 @@ export class ExpertClaimService { damagedParts, awaitingFactorValidation: isFactorValidationPending, requiresFileMakerApproval: !!(claim as any).requiresFileMakerApproval, + fileMakerRejectionCount: (claim as any).fileMakerRejectionCount ?? 0, + fileMakerRejectionReason: (claim as any).fileMakerRejectionReason ?? undefined, + fileMakerApprovalActorId: (claim as any).fileMakerApprovalActorId + ? String((claim as any).fileMakerApprovalActorId) + : undefined, evaluation: (evaluationForApi as | ClaimDetailV2ResponseDto["evaluation"]