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,
|
||||
DescriptionV4Dto,
|
||||
@@ -57,11 +60,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
|
||||
*
|
||||
* CAR_BODY sequence: same but single party — omit second-party steps.
|
||||
@@ -91,14 +94,19 @@ export class FileMakerBlameV4Controller {
|
||||
fileMaker,
|
||||
// requiresFileMakerApproval is V5-only; explicitly exclude it from V4 so
|
||||
// a client that accidentally sends the field cannot poison the blame record.
|
||||
{ ...dto, creationMethod: CreationMethod.IN_PERSON, requiresFileMakerApproval: false },
|
||||
{
|
||||
...dto,
|
||||
creationMethod: CreationMethod.IN_PERSON,
|
||||
requiresFileMakerApproval: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@Get("my-files")
|
||||
@ApiOperation({
|
||||
summary: "List all blame files created by this FileMaker",
|
||||
description: "Returns V4 FileMaker blame files using the shared search, sort, filter, and pagination query contract.",
|
||||
description:
|
||||
"Returns V4 FileMaker blame files using the shared search, sort, filter, and pagination query contract.",
|
||||
})
|
||||
async getMyFiles(
|
||||
@CurrentUser() fileMaker: any,
|
||||
@@ -111,13 +119,17 @@ export class FileMakerBlameV4Controller {
|
||||
@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 V4 FileMaker blame file.",
|
||||
description:
|
||||
"Returns full detail — parties, workflow, linked claim ID — for one V4 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")
|
||||
@@ -312,7 +324,7 @@ export class FileMakerBlameV4Controller {
|
||||
)
|
||||
@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