forked from Yara724/api
feat: manage expert access and merge Parsian expert seeds
Allow role-specific identities and admin account activation, support national-code-only claim experts, and remove required voice from v4/v5. Add a combined, resumable Parsian seed that preserves existing accounts and merges locations and product codes.
This commit is contained in:
@@ -31,7 +31,10 @@ import { RoleEnum } from "src/Types&Enums/role.enum";
|
||||
import { CreationMethod } from "./entities/schema/request-management.schema";
|
||||
import { CreateExpertInitiatedFileDto } from "./dto/expert-initiated.dto";
|
||||
import { SendPartyOtpDto, VerifyPartyOtpDto } from "./dto/party-otp.dto";
|
||||
import { RunInquiriesV3Dto, RunInquiriesVinV3Dto } from "./dto/run-inquiries-v3.dto";
|
||||
import {
|
||||
RunInquiriesV3Dto,
|
||||
RunInquiriesVinV3Dto,
|
||||
} from "./dto/run-inquiries-v3.dto";
|
||||
import {
|
||||
CarBodyFormDto,
|
||||
DescriptionDto,
|
||||
@@ -60,11 +63,11 @@ import { ListQueryV2Dto } from "src/common/dto/list-query-v2.dto";
|
||||
* THIRD_PARTY sequence:
|
||||
* create → send-party-otp (guilty) → verify-party-otp (guilty)
|
||||
* → [car-body-form if CAR_BODY] → run-inquiries (guilty + auto claim)
|
||||
* → add-detail-location / add-detail-description / upload-voice (guilty)
|
||||
* → add-detail-description (voice optional) (guilty)
|
||||
* → sign (guilty)
|
||||
* → send-party-otp (damaged) → verify-party-otp (damaged)
|
||||
* → run-inquiries (damaged)
|
||||
* → add-detail-location / add-detail-description / upload-voice (damaged)
|
||||
* → add-detail-description (voice optional) (damaged)
|
||||
* → sign (damaged) ← FileMaker job done here
|
||||
*/
|
||||
@ApiTags("v5 FileMaker — blame file creation (with FinancialExpert approval)")
|
||||
@@ -90,14 +93,19 @@ export class FileMakerBlameV5Controller {
|
||||
) {
|
||||
return this.requestManagementService.createExpertInitiatedBlameV2(
|
||||
fileMaker,
|
||||
{ ...dto, creationMethod: CreationMethod.IN_PERSON, requiresFileMakerApproval: true },
|
||||
{
|
||||
...dto,
|
||||
creationMethod: CreationMethod.IN_PERSON,
|
||||
requiresFileMakerApproval: true,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@Get("my-files")
|
||||
@ApiOperation({
|
||||
summary: "List all blame files created by this FileMaker",
|
||||
description: "Returns V5 FileMaker blame files using the shared search, sort, filter, and pagination query contract.",
|
||||
description:
|
||||
"Returns V5 FileMaker blame files using the shared search, sort, filter, and pagination query contract.",
|
||||
})
|
||||
async getMyFiles(
|
||||
@CurrentUser() fileMaker: any,
|
||||
@@ -110,13 +118,17 @@ export class FileMakerBlameV5Controller {
|
||||
@ApiParam({ name: "requestId", description: "Blame request ID" })
|
||||
@ApiOperation({
|
||||
summary: "Get a single blame file created by this FileMaker",
|
||||
description: "Returns full detail — parties, workflow, linked claim ID — for one V5 FileMaker blame file.",
|
||||
description:
|
||||
"Returns full detail — parties, workflow, linked claim ID — for one V5 FileMaker blame file.",
|
||||
})
|
||||
async getMyFileDetail(
|
||||
@Param("requestId") requestId: string,
|
||||
@CurrentUser() fileMaker: any,
|
||||
) {
|
||||
return this.requestManagementService.getMyFileMakerFileDetail(fileMaker, requestId);
|
||||
return this.requestManagementService.getMyFileMakerFileDetail(
|
||||
fileMaker,
|
||||
requestId,
|
||||
);
|
||||
}
|
||||
|
||||
@Get("claim-id/:requestId")
|
||||
@@ -306,7 +318,7 @@ export class FileMakerBlameV5Controller {
|
||||
)
|
||||
@Post("upload-voice/:requestId")
|
||||
@ApiParam({ name: "requestId" })
|
||||
@ApiOperation({ summary: "Upload voice for current party" })
|
||||
@ApiOperation({ summary: "Upload optional voice for current party" })
|
||||
async uploadVoice(
|
||||
@Param("requestId") requestId: string,
|
||||
@CurrentUser() fileMaker: any,
|
||||
|
||||
Reference in New Issue
Block a user