forked from Yara724/api
Fixed enrichedEvaluation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { BlameRequestType } from 'src/Types&Enums/blame-request-management/blameRequestType.enum';
|
||||
import { DamageSelectedPartV2BodyDto } from 'src/claim-request-management/dto/damage-selected-part-v2.dto';
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { BlameRequestType } from "src/Types&Enums/blame-request-management/blameRequestType.enum";
|
||||
import { DamageSelectedPartV2BodyDto } from "src/claim-request-management/dto/damage-selected-part-v2.dto";
|
||||
|
||||
export class ClaimDetailV2ResponseDto {
|
||||
@ApiProperty()
|
||||
@@ -21,7 +21,7 @@ export class ClaimDetailV2ResponseDto {
|
||||
@ApiPropertyOptional()
|
||||
nextStep?: string;
|
||||
|
||||
@ApiProperty({ description: 'Whether claim is locked' })
|
||||
@ApiProperty({ description: "Whether claim is locked" })
|
||||
locked: boolean;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@@ -47,64 +47,70 @@ export class ClaimDetailV2ResponseDto {
|
||||
};
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Blame file type from linked blame case',
|
||||
description: "Blame file type from linked blame case",
|
||||
enum: BlameRequestType,
|
||||
})
|
||||
blameRequestType?: BlameRequestType;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'CAR_BODY only: first-step flags — another car (`car`) and/or object (`object`)',
|
||||
"CAR_BODY only: first-step flags — another car (`car`) and/or object (`object`)",
|
||||
example: { car: true, object: false },
|
||||
})
|
||||
carBodyFirstForm?: { car?: boolean; object?: boolean };
|
||||
|
||||
@ApiPropertyOptional({ description: 'Blame request ID', example: '507f...' })
|
||||
@ApiPropertyOptional({ description: "Blame request ID", example: "507f..." })
|
||||
blameRequestId?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Blame request number', example: 'BL12345' })
|
||||
@ApiPropertyOptional({
|
||||
description: "Blame request number",
|
||||
example: "BL12345",
|
||||
})
|
||||
blameRequestNo?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Selected outer damaged parts (id, name, side, label_fa)',
|
||||
description: "Selected outer damaged parts (id, name, side, label_fa)",
|
||||
type: [DamageSelectedPartV2BodyDto],
|
||||
})
|
||||
selectedParts?: DamageSelectedPartV2BodyDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: 'Selected other damaged parts' })
|
||||
@ApiPropertyOptional({ description: "Selected other damaged parts" })
|
||||
otherParts?: string[];
|
||||
|
||||
@ApiPropertyOptional({ description: 'Required documents status' })
|
||||
requiredDocuments?: Record<string, {
|
||||
uploaded: boolean;
|
||||
fileId?: string;
|
||||
fileName?: string;
|
||||
filePath?: string;
|
||||
}>;
|
||||
@ApiPropertyOptional({ description: "Required documents status" })
|
||||
requiredDocuments?: Record<
|
||||
string,
|
||||
{
|
||||
uploaded: boolean;
|
||||
fileId?: string;
|
||||
fileName?: string;
|
||||
filePath?: string;
|
||||
}
|
||||
>;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Car angles captured' })
|
||||
@ApiPropertyOptional({ description: "Car angles captured" })
|
||||
carAngles?: Record<string, { captured: boolean; url?: string }>;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Per-part captures (array index matches selectedParts; includes id, name, side, label_fa, captured, url)',
|
||||
type: 'array',
|
||||
"Per-part captures (array index matches selectedParts; includes id, name, side, label_fa, captured, url)",
|
||||
type: "array",
|
||||
items: {
|
||||
type: 'object',
|
||||
type: "object",
|
||||
properties: {
|
||||
index: { type: 'number' },
|
||||
index: { type: "number" },
|
||||
partId: {
|
||||
type: 'number',
|
||||
type: "number",
|
||||
nullable: true,
|
||||
description:
|
||||
'Numeric catalog part id for outer parts (`null` for non-catalog lines); use in reply/submit and price-drop',
|
||||
"Numeric catalog part id for outer parts (`null` for non-catalog lines); use in reply/submit and price-drop",
|
||||
},
|
||||
id: { type: 'number', nullable: true },
|
||||
name: { type: 'string' },
|
||||
side: { type: 'string' },
|
||||
label_fa: { type: 'string' },
|
||||
captured: { type: 'boolean' },
|
||||
url: { type: 'string' },
|
||||
id: { type: "number", nullable: true },
|
||||
name: { type: "string" },
|
||||
side: { type: "string" },
|
||||
label_fa: { type: "string" },
|
||||
captured: { type: "boolean" },
|
||||
url: { type: "string" },
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -121,24 +127,25 @@ export class ClaimDetailV2ResponseDto {
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'True when user uploaded all required factors and the case awaits expert approve/reject.',
|
||||
"True when user uploaded all required factors and the case awaits expert approve/reject.",
|
||||
})
|
||||
awaitingFactorValidation?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Slice of `claim.evaluation` exposed to the damage expert. ' +
|
||||
'`damageExpertReply` / `damageExpertReplyFinal` are returned only while ' +
|
||||
'awaiting factor validation. `ownerInsurerApproval` and ' +
|
||||
'`ownerPricedPartsApproval` are returned whenever they exist on the ' +
|
||||
'claim — each carries `signLink` (resolved from `signDetailId`) so the ' +
|
||||
'front-end can render the user signature directly. Likewise, ' +
|
||||
'`damageExpertReply.userComment` / `damageExpertReplyFinal.userComment` ' +
|
||||
'expose `signLink` when a user comment signature is present.',
|
||||
"Slice of `claim.evaluation` exposed to the damage expert. " +
|
||||
"`damageExpertReply` / `damageExpertReplyFinal` are returned only while " +
|
||||
"awaiting factor validation. `ownerInsurerApproval` and " +
|
||||
"`ownerPricedPartsApproval` are returned whenever they exist on the " +
|
||||
"claim — each carries `signLink` (resolved from `signDetailId`) so the " +
|
||||
"front-end can render the user signature directly. Likewise, " +
|
||||
"`damageExpertReply.userComment` / `damageExpertReplyFinal.userComment` " +
|
||||
"expose `signLink` when a user comment signature is present.",
|
||||
})
|
||||
evaluation?: {
|
||||
damageExpertReply?: unknown;
|
||||
damageExpertReplyFinal?: unknown;
|
||||
damageExpertResend: unknown;
|
||||
ownerInsurerApproval?: {
|
||||
agree: boolean;
|
||||
branchId?: string;
|
||||
@@ -166,7 +173,7 @@ export class ClaimDetailV2ResponseDto {
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Owner objection to expert-priced parts (`evaluation.objection`): disputed lines + optional new parts + submission time.',
|
||||
"Owner objection to expert-priced parts (`evaluation.objection`): disputed lines + optional new parts + submission time.",
|
||||
})
|
||||
objection?: {
|
||||
objectionParts?: Array<Record<string, unknown>>;
|
||||
@@ -176,7 +183,7 @@ export class ClaimDetailV2ResponseDto {
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Car walk-around video from `claim-video-capture` (resolved from `media.videoCaptureId`).',
|
||||
"Car walk-around video from `claim-video-capture` (resolved from `media.videoCaptureId`).",
|
||||
})
|
||||
videoCapture?: {
|
||||
id: string;
|
||||
@@ -187,18 +194,19 @@ export class ClaimDetailV2ResponseDto {
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Linked blame case (`blameCases`), same shape as expert-blame detail: parties with video/voice URLs, workflow, expert, formatted dates.',
|
||||
"Linked blame case (`blameCases`), same shape as expert-blame detail: parties with video/voice URLs, workflow, expert, formatted dates.",
|
||||
})
|
||||
blameCase?: Record<string, unknown>;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'Same as `blameCase.expert.decision` when present: guilty party id, description, accident fields, decidedAt.',
|
||||
"Same as `blameCase.expert.decision` when present: guilty party id, description, accident fields, decidedAt.",
|
||||
})
|
||||
blameExpertDecision?: Record<string, unknown>;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Claim payout / banking metadata from the claim file (e.g. Sheba).',
|
||||
description:
|
||||
"Claim payout / banking metadata from the claim file (e.g. Sheba).",
|
||||
})
|
||||
money?: {
|
||||
sheba?: string;
|
||||
|
||||
Reference in New Issue
Block a user