forked from Yara724/api
Added Field Expert flows, and deactivated inquiry
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
|
||||
/**
|
||||
* Body for field expert uploading a party's signature for expert-initiated IN_PERSON blame.
|
||||
*/
|
||||
export class ExpertUploadPartySignatureDto {
|
||||
@ApiProperty({
|
||||
enum: ["FIRST", "SECOND"],
|
||||
description: "Which party's signature is being uploaded. CAR_BODY: use FIRST only. THIRD_PARTY: FIRST and SECOND.",
|
||||
})
|
||||
partyRole: "FIRST" | "SECOND";
|
||||
|
||||
@ApiProperty({
|
||||
default: true,
|
||||
description: "Party accepts the blame agreement (true). Set false if party rejects.",
|
||||
})
|
||||
isAccept: boolean;
|
||||
}
|
||||
19
src/request-management/dto/send-party-otps.dto.ts
Normal file
19
src/request-management/dto/send-party-otps.dto.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
|
||||
/**
|
||||
* Body for field expert to request OTP send to one or two parties for expert-initiated IN_PERSON blame.
|
||||
* Uses the same SMS flow as /user/send-otp. After this, parties receive SMS with OTP; expert collects and calls verify-party-otps.
|
||||
*/
|
||||
export class SendPartyOtpsDto {
|
||||
@ApiProperty({
|
||||
description: "First party phone number (e.g. 09123456789). SMS with OTP will be sent to this number.",
|
||||
example: "09123456789",
|
||||
})
|
||||
firstPartyPhoneNumber: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "Second party phone number. Required when blame type is THIRD_PARTY. SMS with OTP will be sent to this number.",
|
||||
example: "09187654321",
|
||||
})
|
||||
secondPartyPhoneNumber?: string;
|
||||
}
|
||||
31
src/request-management/dto/verify-party-otps.dto.ts
Normal file
31
src/request-management/dto/verify-party-otps.dto.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
|
||||
/**
|
||||
* Body for field expert to verify one or two party OTPs for expert-initiated IN_PERSON blame.
|
||||
* First party must verify; second party required only when type is THIRD_PARTY.
|
||||
*/
|
||||
export class VerifyPartyOtpsDto {
|
||||
@ApiProperty({
|
||||
description: "First party phone number (must have requested OTP via /user/send-otp)",
|
||||
example: "09123456789",
|
||||
})
|
||||
firstPartyPhoneNumber: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: "OTP received by first party",
|
||||
example: "258567",
|
||||
})
|
||||
firstPartyOtp: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "Second party phone number. Required when blame type is THIRD_PARTY.",
|
||||
example: "09187654321",
|
||||
})
|
||||
secondPartyPhoneNumber?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: "OTP received by second party. Required when secondPartyPhoneNumber is provided.",
|
||||
example: "123456",
|
||||
})
|
||||
secondPartyOtp?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user