forked from Yara724/api
resolved conflicts and maintained new features
This commit is contained in:
@@ -83,6 +83,21 @@ export class ClaimDetailV2ResponseDto {
|
||||
@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;
|
||||
};
|
||||
|
||||
@ApiProperty()
|
||||
createdAt: string;
|
||||
|
||||
|
||||
@@ -46,6 +46,12 @@ export class ClaimListItemV2Dto {
|
||||
|
||||
@ApiProperty({ description: 'Submission date', example: '2026-02-22T10:00:00.000Z' })
|
||||
createdAt: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'True when the claim is in the expert factor validation queue (all factors uploaded).',
|
||||
})
|
||||
awaitingFactorValidation?: boolean;
|
||||
}
|
||||
|
||||
export class GetClaimListV2ResponseDto {
|
||||
|
||||
@@ -8,6 +8,8 @@ import {
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ClaimRequiredDocumentType } from 'src/Types&Enums/claim-request-management/required-document-type.enum';
|
||||
import { DamagedPartItem } from 'src/claim-request-management/dto/capture-requirements-v2.dto';
|
||||
|
||||
export class CarPartDamageV2Dto {
|
||||
@ApiProperty({ example: 'left' })
|
||||
@@ -68,3 +70,14 @@ export class SubmitExpertReplyV2Dto {
|
||||
@Type(() => PartPricingV2Dto)
|
||||
parts: PartPricingV2Dto[];
|
||||
}
|
||||
|
||||
export class ClaimSubmitResendV2Dto {
|
||||
@ApiProperty({ required: true })
|
||||
resendDescription: string;
|
||||
|
||||
@ApiProperty({ required: true, examples: ClaimRequiredDocumentType })
|
||||
resendDocuments: ClaimRequiredDocumentType[];
|
||||
|
||||
@ApiProperty({ required: true, type: [DamagedPartItem] })
|
||||
resendCarParts: DamagedPartItem[];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { Type } from "class-transformer";
|
||||
import {
|
||||
IsArray,
|
||||
@@ -31,3 +31,45 @@ export class FactorValidationDto {
|
||||
@Type(() => FactorDecisionDto)
|
||||
decisions: FactorDecisionDto[];
|
||||
}
|
||||
|
||||
/** V2 ClaimCase: expert confirms or overrides part pricing when validating uploaded factors. */
|
||||
class FactorDecisionV2Dto {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
partId: string;
|
||||
|
||||
@ApiProperty({ enum: [FactorStatus.APPROVED, FactorStatus.REJECTED] })
|
||||
@IsEnum([FactorStatus.APPROVED, FactorStatus.REJECTED])
|
||||
status: FactorStatus;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
rejectionReason?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
"Expert-adjusted values (Persian/ASCII digits ok). For REJECTED factors, provide at least totalPayment (or price and salary).",
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
price?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
salary?: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
totalPayment?: string;
|
||||
}
|
||||
|
||||
export class FactorValidationV2Dto {
|
||||
@ApiProperty({ type: [FactorDecisionV2Dto] })
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => FactorDecisionV2Dto)
|
||||
decisions: FactorDecisionV2Dto[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user