diff --git a/src/claim-request-management/claim-request-management.service.ts b/src/claim-request-management/claim-request-management.service.ts index d6bcb67..ea6a7a2 100644 --- a/src/claim-request-management/claim-request-management.service.ts +++ b/src/claim-request-management/claim-request-management.service.ts @@ -5439,6 +5439,10 @@ export class ClaimRequestManagementService { const ownerData = claim.owner ? { userId: claim.owner.userId?.toString(), + clientId: claim.owner.clientId?.toString(), + ...(claim.owner.userClientKey + ? { userClientKey: claim.owner.userClientKey.toString() } + : {}), fullName: claim.owner.fullName, } : undefined; @@ -5467,7 +5471,7 @@ export class ClaimRequestManagementService { nextStep: claim.workflow?.nextStep, blameRequestId: claim.blameRequestId?.toString(), blameRequestNo: claim.blameRequestNo, - ...(isExpertViewer ? { owner: ownerData } : {}), + ...(ownerData ? { owner: ownerData } : {}), vehicle: claim.vehicle, selectedParts: claim.damage?.selectedParts, otherParts: claim.damage?.otherParts, diff --git a/src/claim-request-management/dto/claim-details-v2.dto.ts b/src/claim-request-management/dto/claim-details-v2.dto.ts index 2bbfe75..63f0eb0 100644 --- a/src/claim-request-management/dto/claim-details-v2.dto.ts +++ b/src/claim-request-management/dto/claim-details-v2.dto.ts @@ -43,9 +43,13 @@ export class ClaimDetailsV2ResponseDto { @ApiPropertyOptional({ description: 'Blame request number' }) blameRequestNo?: string; - @ApiPropertyOptional({ description: 'Owner info' }) + @ApiPropertyOptional({ + description: 'Claim owner (damaged party): ids for the user and their insurer client scope', + }) owner?: { userId: string; + clientId?: string; + userClientKey?: string; fullName?: string; };