forked from Yara724/api
blame and claim refactored
This commit is contained in:
163
src/claim-request-management/dto/capture-requirements-v2.dto.ts
Normal file
163
src/claim-request-management/dto/capture-requirements-v2.dto.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
/**
|
||||
* DTO for required document item
|
||||
*/
|
||||
export class RequiredDocumentItem {
|
||||
@ApiProperty({
|
||||
description: 'Document key/type',
|
||||
example: 'car_green_card',
|
||||
})
|
||||
key: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in Farsi',
|
||||
example: 'کارت سبز خودرو',
|
||||
})
|
||||
label_fa: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in English',
|
||||
example: 'Car Green Card',
|
||||
})
|
||||
label_en: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Whether this document has been uploaded',
|
||||
example: false,
|
||||
})
|
||||
uploaded: boolean;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Category of the document',
|
||||
example: 'general',
|
||||
enum: ['general', 'damaged_party', 'guilty_party'],
|
||||
})
|
||||
category: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* DTO for car angle item
|
||||
*/
|
||||
export class CarAngleItem {
|
||||
@ApiProperty({
|
||||
description: 'Angle key',
|
||||
example: 'front',
|
||||
enum: ['front', 'back', 'left', 'right'],
|
||||
})
|
||||
key: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in Farsi',
|
||||
example: 'جلو',
|
||||
})
|
||||
label_fa: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in English',
|
||||
example: 'Front',
|
||||
})
|
||||
label_en: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Whether this angle has been captured',
|
||||
example: false,
|
||||
})
|
||||
captured: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* DTO for damaged part item
|
||||
*/
|
||||
export class DamagedPartItem {
|
||||
@ApiProperty({
|
||||
description: 'Part key',
|
||||
example: 'hood',
|
||||
})
|
||||
key: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in Farsi',
|
||||
example: 'کاپوت',
|
||||
})
|
||||
label_fa: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Display label in English',
|
||||
example: 'Hood',
|
||||
})
|
||||
label_en: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Whether this part has been captured',
|
||||
example: false,
|
||||
})
|
||||
captured: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Response DTO for capture requirements V2
|
||||
*/
|
||||
export class GetCaptureRequirementsV2ResponseDto {
|
||||
@ApiProperty({
|
||||
description: 'Claim request ID',
|
||||
example: '507f1f77bcf86cd799439011',
|
||||
})
|
||||
claimRequestId: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Public ID',
|
||||
example: 'A14235',
|
||||
})
|
||||
publicId: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Current workflow step',
|
||||
example: 'UPLOAD_REQUIRED_DOCUMENTS',
|
||||
})
|
||||
currentStep: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'List of required documents to upload',
|
||||
type: [RequiredDocumentItem],
|
||||
})
|
||||
requiredDocuments: RequiredDocumentItem[];
|
||||
|
||||
@ApiProperty({
|
||||
description: 'List of car angles to capture',
|
||||
type: [CarAngleItem],
|
||||
})
|
||||
carAngles: CarAngleItem[];
|
||||
|
||||
@ApiProperty({
|
||||
description: 'List of damaged parts to capture',
|
||||
type: [DamagedPartItem],
|
||||
})
|
||||
damagedParts: DamagedPartItem[];
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Total number of items remaining',
|
||||
example: 18,
|
||||
})
|
||||
totalRemaining: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Summary of progress',
|
||||
example: {
|
||||
documentsUploaded: 2,
|
||||
documentsTotal: 13,
|
||||
anglesCapture: 0,
|
||||
anglesTotal: 4,
|
||||
partsCapture: 0,
|
||||
partsTotal: 3,
|
||||
},
|
||||
})
|
||||
progress: {
|
||||
documentsUploaded: number;
|
||||
documentsTotal: number;
|
||||
anglesCaptured: number;
|
||||
anglesTotal: number;
|
||||
partsCaptured: number;
|
||||
partsTotal: number;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user