From 0e1042a4732e980766542d5cadc81302b9d76990 Mon Sep 17 00:00:00 2001 From: Rashmika998 Date: Wed, 18 Feb 2026 18:42:35 +0530 Subject: [PATCH] Update deployed products response type --- .../customer-portal/backend/modules/entity/types.bal | 12 ++++++++++++ apps/customer-portal/backend/modules/types/types.bal | 12 ++++++++++++ apps/customer-portal/backend/utils.bal | 9 ++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/apps/customer-portal/backend/modules/entity/types.bal b/apps/customer-portal/backend/modules/entity/types.bal index ea4b11014d..ade1f7e1e9 100644 --- a/apps/customer-portal/backend/modules/entity/types.bal +++ b/apps/customer-portal/backend/modules/entity/types.bal @@ -508,6 +508,18 @@ public type DeployedProduct record {| ReferenceTableItem? deployment; # Product information ReferenceTableItem? product; + # Product version + ReferenceTableItem? version; + # Cores allocated for the product + int? cores; + # TPS allocated for the product + int? tps; + # Release date of the product + string? releasedOn; + # End of life date of the product + string? endOfLifeOn; + # Update level of the product + string? updateLevel; json...; |}; diff --git a/apps/customer-portal/backend/modules/types/types.bal b/apps/customer-portal/backend/modules/types/types.bal index 8772c082d2..2c8911afc8 100644 --- a/apps/customer-portal/backend/modules/types/types.bal +++ b/apps/customer-portal/backend/modules/types/types.bal @@ -342,6 +342,18 @@ public type DeployedProduct record {| ReferenceItem? product; # Deployment ReferenceItem? deployment; + # Product version + ReferenceItem? version; + # Cores allocated for the product + int? cores; + # TPS allocated for the product + int? tps; + # Release date of the product + string? releasedOn; + # End of life date of the product + string? endOfLifeOn; + # Update level of the product + string? updateLevel; |}; # Payload for creating a comment. diff --git a/apps/customer-portal/backend/utils.bal b/apps/customer-portal/backend/utils.bal index 2780ef1325..1dfb9a940d 100644 --- a/apps/customer-portal/backend/utils.bal +++ b/apps/customer-portal/backend/utils.bal @@ -235,13 +235,20 @@ public isolated function mapDeployedProducts(entity:DeployedProductsResponse res return from entity:DeployedProduct product in response.deployedProducts let entity:ReferenceTableItem? associatedProduct = product.product let entity:ReferenceTableItem? deployment = product.deployment + let entity:ReferenceTableItem? version = product.version select { id: product.id, createdOn: product.createdOn, updatedOn: product.updatedOn, description: product.description, + cores: product.cores, + tps: product.tps, + releasedOn: product.releasedOn, + endOfLifeOn: product.endOfLifeOn, + updateLevel: product.updateLevel, product: associatedProduct != () ? {id: associatedProduct.id, label: associatedProduct.name} : (), - deployment: deployment != () ? {id: deployment.id, label: deployment.name} : () + deployment: deployment != () ? {id: deployment.id, label: deployment.name} : (), + version: version != () ? {id: version.id, label: version.name} : () }; }