1
0
forked from Yara724/api
Files
yara724-api/src/expert-claim/dto/claim-detail-v2.dto.ts
2026-05-01 11:14:05 +03:30

149 lines
3.8 KiB
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { BlameRequestType } from 'src/Types&Enums/blame-request-management/blameRequestType.enum';
export class ClaimDetailV2ResponseDto {
@ApiProperty()
claimRequestId: string;
@ApiProperty()
publicId: string;
@ApiProperty()
status: string;
@ApiProperty()
claimStatus: string;
@ApiProperty()
currentStep: string;
@ApiPropertyOptional()
nextStep?: string;
@ApiProperty({ description: 'Whether claim is locked' })
locked: boolean;
@ApiPropertyOptional()
lockedBy?: {
actorId: string;
actorName: string;
lockedAt: string;
expiredAt?: string;
};
@ApiPropertyOptional()
owner?: {
userId: string;
fullName?: string;
};
@ApiPropertyOptional()
vehicle?: {
carName?: string;
carModel?: string;
carType?: string;
plate?: any;
};
@ApiPropertyOptional({
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`)',
example: { car: true, object: false },
})
carBodyFirstForm?: { car?: boolean; object?: boolean };
@ApiPropertyOptional({ description: 'Blame request ID', example: '507f...' })
blameRequestId?: string;
@ApiPropertyOptional({ description: 'Blame request number', example: 'BL12345' })
blameRequestNo?: string;
@ApiPropertyOptional({ description: 'Selected outer damaged parts' })
selectedParts?: string[];
@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: 'Car angles captured' })
carAngles?: Record<string, { captured: boolean; url?: string }>;
@ApiPropertyOptional({ description: 'Damaged parts captured' })
damagedParts?: Record<string, { captured: boolean; url?: string }>;
@ApiPropertyOptional({
description:
'True when user uploaded all required factors and the case awaits expert approve/reject.',
})
awaitingFactorValidation?: boolean;
@ApiPropertyOptional({
description:
'Expert reply payloads (first and/or final) when awaiting factor validation.',
})
evaluation?: {
damageExpertReply?: unknown;
damageExpertReplyFinal?: unknown;
};
@ApiPropertyOptional({
description:
'Owner objection to expert-priced parts (`evaluation.objection`): disputed lines + optional new parts + submission time.',
})
objection?: {
objectionParts?: Array<Record<string, unknown>>;
newParts?: Array<Record<string, unknown>>;
submittedAt?: Date | string;
};
@ApiPropertyOptional({
description:
'Car walk-around video from `claim-video-capture` (resolved from `media.videoCaptureId`).',
})
videoCapture?: {
id: string;
url?: string;
path?: string;
fileName?: string;
};
@ApiPropertyOptional({
description:
'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.',
})
blameExpertDecision?: Record<string, unknown>;
@ApiPropertyOptional({
description: 'Claim payout / banking metadata from the claim file (e.g. Sheba).',
})
money?: {
sheba?: string;
nationalCodeOfInsurer?: string;
};
@ApiProperty()
createdAt: string;
@ApiProperty()
updatedAt: string;
}