forked from Yara724/api
Fix v3 mirror flow
This commit is contained in:
@@ -26,6 +26,7 @@ import { CurrentUser } from "src/decorators/user.decorator";
|
||||
import { FileRating } from "src/request-management/entities/schema/request-management.schema";
|
||||
import { RoleEnum } from "src/Types&Enums/role.enum";
|
||||
import { ExpertInsurerService } from "./expert-insurer.service";
|
||||
import { ListQueryV2Dto } from "src/common/dto/list-query-v2.dto";
|
||||
import { CreateBranchDto } from "src/client/dto/create-branch.dto";
|
||||
import {
|
||||
CreateBlameExpertByInsurerDto,
|
||||
@@ -162,9 +163,46 @@ export class ExpertInsurerController {
|
||||
}
|
||||
|
||||
@Get("files")
|
||||
async getAllFiles(@CurrentUser() insurer) {
|
||||
@ApiOperation({
|
||||
summary: "List insurer files (blame + claim merged by publicId)",
|
||||
description:
|
||||
"Optional query: `search`, `sortBy` (publicId | createdAt | requestNo | status), `sortOrder`, `page`, `limit`, `unifiedStatus`.",
|
||||
})
|
||||
async getAllFiles(
|
||||
@CurrentUser() insurer,
|
||||
@Query() query: ListQueryV2Dto,
|
||||
) {
|
||||
return await this.expertInsurerService.retrieveAllFilesOfClient(
|
||||
insurer.clientKey,
|
||||
query,
|
||||
);
|
||||
}
|
||||
|
||||
@Get("report/unified-file-statuses")
|
||||
@ApiOperation({
|
||||
summary: "Unified file status catalog + counts (blame + claim)",
|
||||
description:
|
||||
"Returns calculatable unified statuses and per-status counts for this insurer's files. Use `unifiedStatus` on GET files to filter.",
|
||||
})
|
||||
@ApiQuery({
|
||||
name: "from",
|
||||
required: false,
|
||||
description: "Optional start datetime (ISO string)",
|
||||
})
|
||||
@ApiQuery({
|
||||
name: "to",
|
||||
required: false,
|
||||
description: "Optional end datetime (ISO string)",
|
||||
})
|
||||
async getUnifiedFileStatusReport(
|
||||
@CurrentUser() actor,
|
||||
@Query("from") from?: string,
|
||||
@Query("to") to?: string,
|
||||
) {
|
||||
return await this.expertInsurerService.getInsurerUnifiedFileStatusReport(
|
||||
actor,
|
||||
from,
|
||||
to,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -265,6 +303,11 @@ export class ExpertInsurerController {
|
||||
}
|
||||
|
||||
@Get("report/status-counts")
|
||||
@ApiOperation({
|
||||
summary: "Legacy status counts (mapped from unified statuses)",
|
||||
deprecated: true,
|
||||
description: "Prefer GET report/unified-file-statuses for full calculatable blame+claim statuses.",
|
||||
})
|
||||
@ApiQuery({
|
||||
name: "from",
|
||||
required: false,
|
||||
|
||||
Reference in New Issue
Block a user