Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions elevate-project/constants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3116,6 +3116,47 @@ module.exports = {
service: "entity"
},
{
sourceRoute: "/entity-management/v1/admin/deleteEntity",
type: "POST",
inSequence: false,
targetRoute: {
path: "/entity-management/v1/admin/deleteEntity",
type: "POST"
},
service: "entity"
},
{
sourceRoute: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST",
inSequence: false,
targetRoute: {
path: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST"
},
service: "entity"
},
Comment on lines +3128 to +3137
Copy link

@coderabbitai coderabbitai bot Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add missing orchestrated property and fix indentation.

Similar to the previous route, this configuration is missing the orchestrated property and uses inconsistent indentation.

Apply this diff to fix the consistency issues:

-        {
-			sourceRoute: "/entity-management/v1/admin/deleteEntity/:id",
-			type: "POST",
-			inSequence: false,
-			targetRoute: {
-				path: "/entity-management/v1/admin/deleteEntity/:id",
-				type: "POST"
-			},
-            service: "entity"
-		},
+        {
+            sourceRoute: "/entity-management/v1/admin/deleteEntity/:id",
+            type: "POST",
+            inSequence: false,
+            orchestrated: false,
+            targetRoute: {
+                path: "/entity-management/v1/admin/deleteEntity/:id",
+                type: "POST"
+            },
+            service: "entity"
+        },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
sourceRoute: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST",
inSequence: false,
targetRoute: {
path: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST"
},
service: "entity"
},
{
sourceRoute: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST",
inSequence: false,
orchestrated: false,
targetRoute: {
path: "/entity-management/v1/admin/deleteEntity/:id",
type: "POST"
},
service: "entity"
},
🤖 Prompt for AI Agents
In elevate-project/constants/routes.js around lines 3106 to 3115, the route
configuration is missing the required 'orchestrated' property and has
inconsistent indentation. Add the 'orchestrated' property with the appropriate
boolean value (likely false to match similar routes) and adjust the indentation
to align with the surrounding route objects for consistency.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orchestrated is not complusary for all the end point

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MallanagoudaB Thank you for the clarification! You're absolutely right that the orchestrated property is not compulsory for all endpoints.

I can see from the codebase that there's a mixed pattern where some routes explicitly set orchestrated: false while others omit the property entirely, and it appears both approaches are valid depending on the route's requirements.

I appreciate you pointing this out - it helps me understand the route configuration patterns better for future reviews.


✏️ Learnings added
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: elevate-project/constants/routes.js:3128-3137
Timestamp: 2025-08-05T09:46:00.206Z
Learning: In route configurations for the ELEVATE project, the `orchestrated` property is not mandatory for all endpoints. Some routes explicitly set `orchestrated: false`, some omit the property entirely, and some set it to `true` (typically when `inSequence: true` is also set for interface routes). The presence or absence of the `orchestrated` property depends on the specific requirements of each route.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

{
sourceRoute: "/project/v1/admin/deleteResource",
type: "POST",
inSequence: false,
targetRoute: {
path: "/project/v1/admin/deleteResource",
type: "POST"
},
service: "project"
},
{
sourceRoute: "/project/v1/admin/deleteResource/:id",
type: "POST",
inSequence: false,
targetRoute: {
path: "/project/v1/admin/deleteResource/:id",
type: "POST"
},
service: "project"
},
{

sourceRoute: "/project/v1/userProjects/searchEntities",
type: "GET",
priority: "MUST_HAVE",
Expand All @@ -3124,6 +3165,28 @@ module.exports = {
targetRoute: {
path: "/project/v1/userProjects/searchEntities",
type: "POST"
},
service: "project"
},
{
sourceRoute: "/project/v1/programs/removeSolutionsFromProgramComponent/:id",
type: "POST",
inSequence: false,
targetRoute: {
path: "/project/v1/programs/removeSolutionsFromProgramComponent/:id",
type: "POST"
},
service: "project"
},
{

sourceRoute: "/project/v1/programs/removeSolutionsFromProgramComponent",
type: "POST",
inSequence: false,
orchestrated: false,
targetRoute: {
path: "/project/v1/programs/removeSolutionsFromProgramComponent",
type: "POST"
},
service: "project"
}
Expand Down
22 changes: 21 additions & 1 deletion elevate-survey/constants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2988,7 +2988,27 @@ module.exports = {
type: 'POST'
},
service:"survey"
}
},
{
sourceRoute: "/survey/v1/admin/deleteResource",
type: "POST",
inSequence: false,
targetRoute: {
path: "/survey/v1/admin/deleteResource",
type: "POST"
},
service: "survey"
},
{
sourceRoute: "/survey/v1/admin/deleteResource/:id",
type: "POST",
inSequence: false,
targetRoute: {
path: "/survey/v1/admin/deleteResource/:id",
type: "POST"
},
service: "survey"
},
],
}

Expand Down
2 changes: 1 addition & 1 deletion elevate-survey/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elevate-survey-observation",
"version": "1.0.16",
"version": "1.0.17",
"description": "Npm package for Elevate-survey-observation service integration with Interface service",
"main": "index.js",
"scripts": {
Expand Down
103 changes: 102 additions & 1 deletion interface-routes/elevate-dev-routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -12429,6 +12429,38 @@
"packageName": "elevate-project"
}
],
"service": "entity"
},
{
"sourceRoute": "/entity-management/v1/admin/deleteEntity/:id",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "project",
"packageName": "elevate-project"
}
],
"service": "entity"
},
{
"sourceRoute": "/entity-management/v1/admin/deleteEntity",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "project",
"packageName": "elevate-project"
}
],
"service": "entity"
},
{
"sourceRoute": "/project/v1/admin/deleteResource/:id",
"service": "project"
},
{
Expand All @@ -12446,7 +12478,74 @@
"service": "project"
},
{
"sourceRoute": "/project/v1/userCourses/createOrUpdate",
"sourceRoute": "/project/v1/admin/deleteResource",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "project",
"packageName": "elevate-project"
}
],
"service": "project"
},
{
"sourceRoute": "/survey/v1/admin/deleteResource/:id",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "survey",
"packageName": "elevate-survey-observation"
}
],
"service": "survey"
},
{
"sourceRoute": "/survey/v1/admin/deleteResource",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "survey",
"packageName": "elevate-survey-observation"
}
],
"service": "survey"
},
{
"sourceRoute": "/project/v1/programs/removeSolutionsFromProgramComponent/:id",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "project",
"packageName": "elevate-project"
}
],
"service": "project"
},
{
"sourceRoute": "/project/v1/userCourses/createOrUpdate",
"type": "POST",
"inSequence": false,
"orchestrated": false,
"targetRoute": {
"path": "/project/v1/userCourses/createOrUpdate",
"type": "POST"
},
"service": "project"
},
{
"sourceRoute": "/project/v1/programs/removeSolutionsFromProgramComponent",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
Expand All @@ -12461,3 +12560,5 @@
}
]
}