forked from Yara724/api
blame and claim refactored
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
RoadCondition,
|
||||
LightCondition,
|
||||
} from "src/Types&Enums/blame-request-management/accident-conditions.enum";
|
||||
import { BlameRequestType } from "src/Types&Enums/blame-request-management/blameRequestType.enum";
|
||||
|
||||
export class InitialFormDto {
|
||||
@ApiProperty({ required: false, default: false })
|
||||
@@ -135,6 +136,28 @@ export class CreateRequestDto {
|
||||
type?: "THIRD_PARTY" | "CAR_BODY";
|
||||
}
|
||||
|
||||
/**
|
||||
* V2 create blame request (new model `BlameRequest`).
|
||||
*/
|
||||
export class CreateBlameRequestDtoV2 {
|
||||
@ApiProperty({ enum: BlameRequestType })
|
||||
type: BlameRequestType;
|
||||
}
|
||||
|
||||
/**
|
||||
* V2 step: FIRST_BLAME_CONFESSION
|
||||
*/
|
||||
export class BlameConfessionDtoV2 {
|
||||
@ApiProperty({ required: false, default: false })
|
||||
expertOpinion?: boolean;
|
||||
|
||||
@ApiProperty({ required: false, default: false })
|
||||
imDamaged?: boolean;
|
||||
|
||||
@ApiProperty({ required: true, default: false })
|
||||
imGuilty?: boolean;
|
||||
}
|
||||
|
||||
// export class DocsOfThisFile {
|
||||
// @ApiProperty()
|
||||
// firstPartyFile?: FirstPartyFileDto;
|
||||
|
||||
46
src/request-management/dto/user-resend.dto.ts
Normal file
46
src/request-management/dto/user-resend.dto.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
|
||||
export class UserResendResponseDto {
|
||||
@ApiProperty({
|
||||
example: "67fa10c259e15f231a2d1aae",
|
||||
description: "Request ID",
|
||||
})
|
||||
requestId: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: ["drivingLicense", "carCertificate"],
|
||||
description: "List of items the current user needs to upload",
|
||||
})
|
||||
requestedItems: string[];
|
||||
|
||||
@ApiProperty({
|
||||
example: "Please resend your driving license and car certificate with better quality",
|
||||
description: "Expert's message explaining why resend is needed",
|
||||
})
|
||||
description: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: false,
|
||||
description: "Whether the user has completed uploading all requested items",
|
||||
})
|
||||
completed: boolean;
|
||||
}
|
||||
|
||||
export class UserResendUploadResponseDto {
|
||||
@ApiProperty({
|
||||
example: "Documents uploaded successfully",
|
||||
})
|
||||
message: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: ["drivingLicense", "carCertificate"],
|
||||
description: "List of items that were uploaded",
|
||||
})
|
||||
uploadedItems: string[];
|
||||
|
||||
@ApiProperty({
|
||||
example: true,
|
||||
description: "Whether all requested items have been uploaded",
|
||||
})
|
||||
allItemsCompleted: boolean;
|
||||
}
|
||||
27
src/request-management/dto/user-signature.dto.ts
Normal file
27
src/request-management/dto/user-signature.dto.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
|
||||
export class UserSignatureResponseDto {
|
||||
@ApiProperty({
|
||||
example: "67fa10c259e15f231a2d1aae",
|
||||
description: "Request ID",
|
||||
})
|
||||
requestId: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: true,
|
||||
description: "Whether the user accepted the expert decision",
|
||||
})
|
||||
accepted: boolean;
|
||||
|
||||
@ApiProperty({
|
||||
example: "COMPLETED",
|
||||
description: "Updated request status",
|
||||
})
|
||||
status: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: "Both parties have signed. Case completed.",
|
||||
description: "Result message",
|
||||
})
|
||||
message: string;
|
||||
}
|
||||
Reference in New Issue
Block a user