Skip to content

added-routes-for-project-survey#338

Merged
VISHNUDAS-tunerlabs merged 2 commits intomasterfrom
ProjectSurveyRoutes
Aug 13, 2025
Merged

added-routes-for-project-survey#338
VISHNUDAS-tunerlabs merged 2 commits intomasterfrom
ProjectSurveyRoutes

Conversation

@MallanagoudaB
Copy link
Copy Markdown
Collaborator

@MallanagoudaB MallanagoudaB commented Aug 11, 2025

Summary by CodeRabbit

  • New Features
    • Added POST API endpoints to delete resources in Project and Survey services, with optional ID-specific variants.
    • Added POST API endpoints to remove solutions from programs in the Project service, with optional ID-specific variants.
  • Chores
    • Updated routing configurations to expose the new endpoints across environments.
    • Bumped the survey package version to 1.0.17.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 11, 2025

Walkthrough

Added new POST route mappings for project and survey deleteResource endpoints (with/without :id) and project programs/removeSolutions endpoints (with/without :id). Updated interface routing JSON to include these six routes pointing to respective services. Bumped elevate-survey package version from 1.0.16 to 1.0.17. No logic changes.

Changes

Cohort / File(s) Summary of Changes
Project routing additions
elevate-project/constants/routes.js
Appended four POST routes: /project/v1/admin/deleteResource, /project/v1/admin/deleteResource/:id, /project/v1/programs/removeSolutions, /project/v1/programs/removeSolutions/:id; each with inSequence: false, targetRoute mirroring source, service: "project".
Survey routing additions
elevate-survey/constants/routes.js
Added two POST routes: /survey/v1/admin/deleteResource, /survey/v1/admin/deleteResource/:id; each with inSequence: false, targetRoute mirroring source, service: "survey".
Interface route mappings
interface-routes/elevate-dev-routes.json
Added six routes mapping to packages/services: project (elevate-project) and survey (elevate-survey-observation); POST, MUST_HAVE, inSequence false, orchestrated false. Minor non-functional formatting adjustments noted.
Package version bump
elevate-survey/package.json
Version updated from 1.0.16 to 1.0.17.

Sequence Diagram(s)

sequenceDiagram
  participant C as Client
  participant G as API Gateway
  participant R as Interface Router
  participant P as Project Service
  participant S as Survey Service

  C->>G: POST /project|/survey ...
  G->>R: Route lookup
  alt project admin/deleteResource or programs/removeSolutions
    R->>P: Forward POST to project service
    P-->>R: Response
  else survey admin/deleteResource
    R->>S: Forward POST to survey service
    S-->>R: Response
  end
  R-->>G: Response
  G-->>C: HTTP response
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • VISHNUDAS-tunerlabs

Poem

I twitch my ears at brand-new routes,
Hop-hop, the gateway now salutes.
Delete and tidy, solutions prune—
Project, Survey, all in tune.
Version bumps and paths aligned,
A carrot of success, neatly defined. 🥕


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f99e15 and 4a96272.

📒 Files selected for processing (2)
  • elevate-project/constants/routes.js (1 hunks)
  • interface-routes/elevate-dev-routes.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • elevate-project/constants/routes.js
  • interface-routes/elevate-dev-routes.json
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ProjectSurveyRoutes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
elevate-survey/package.json (1)

3-3: Version bump looks good.

1.0.17 aligns with exposing new routes in elevate-survey. Proceed to publish/tag as per release process.

elevate-project/package.json (1)

3-3: Version bump acknowledged.

1.1.45 is appropriate with the added project routes. Ship with corresponding interface updates.

interface-routes/elevate-dev-routes.json (2)

12489-12517: Optional: add internal rate limiting for destructive admin route

If your gateway policy requires internal rate limiting for admin operations, add rateLimit. Otherwise ignore.

       "service": "project"
+      ,
+      "rateLimit": {
+        "type": "internal"
+      }

12518-12545: Optional: add internal rate limiting for survey admin route

Only if your policy requires it.

       "service": "survey"
+      ,
+      "rateLimit": {
+        "type": "internal"
+      }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc6b440 and 3f99e15.

📒 Files selected for processing (5)
  • elevate-project/constants/routes.js (1 hunks)
  • elevate-project/package.json (1 hunks)
  • elevate-survey/constants/routes.js (1 hunks)
  • elevate-survey/package.json (1 hunks)
  • interface-routes/elevate-dev-routes.json (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: interface-routes/elevate-dev-routes.json:0-0
Timestamp: 2025-08-05T09:46:57.365Z
Learning: In the ELEVATE project, "deletedResourceDetails" endpoints use POST method instead of GET, even though they appear to be read-only operations. This is by design based on project-specific requirements.
📚 Learning: 2025-08-05T09:46:50.071Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: elevate-project/constants/routes.js:0-0
Timestamp: 2025-08-05T09:46:50.071Z
Learning: In the elevate-project/constants/routes.js file, the `orchestrated` property is not compulsory for all route configurations. Out of 293 total routes, 33 routes (about 11%) exist without this property, making it optional rather than required.

Applied to files:

  • elevate-survey/constants/routes.js
  • elevate-project/constants/routes.js
📚 Learning: 2025-08-05T09:46:50.071Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: elevate-project/constants/routes.js:0-0
Timestamp: 2025-08-05T09:46:50.071Z
Learning: In the elevate-project/constants/routes.js file, the `orchestrated` property is not compulsory for all route configurations. Many routes exist without this property, making it optional rather than required.

Applied to files:

  • elevate-survey/constants/routes.js
  • elevate-project/constants/routes.js
📚 Learning: 2025-08-05T09:46:57.365Z
Learnt from: MallanagoudaB
PR: ELEVATE-Project/utils#329
File: interface-routes/elevate-dev-routes.json:0-0
Timestamp: 2025-08-05T09:46:57.365Z
Learning: In the ELEVATE project, "deletedResourceDetails" endpoints use POST method instead of GET, even though they appear to be read-only operations. This is by design based on project-specific requirements.

Applied to files:

  • elevate-survey/constants/routes.js
  • interface-routes/elevate-dev-routes.json
  • elevate-project/constants/routes.js
🔇 Additional comments (6)
elevate-survey/constants/routes.js (1)

2991-3011: Confirm interface mappings for survey deleteResource endpoints

I wasn’t able to locate an interface-routes directory in the repo root. Please verify that the new admin /survey/v1/admin/deleteResource and /survey/v1/admin/deleteResource/:id routes are exposed in your consumer-facing interface definitions (for example, under interface-routes/elevate-survey-routes.json or similar), with:

  • HTTP method set to POST
  • Service mapped to elevate-survey-observation
elevate-project/constants/routes.js (1)

3151-3189: Routes for admin deleteResource and programs removeSolutions are correctly configured

  • sourceRoute and targetRoute paths match and use POST, consistent with existing admin patterns
  • inSequence: false aligns with neighboring routes
  • service is correctly set to "project"

No further changes needed.

interface-routes/elevate-dev-routes.json (4)

12332-12338: Minor format tweak in /survey/health — OK

No functional impact; mapping remains correct to elevate-survey-observation.


12560-12573: Confirmed param variant registration
The "/project/v1/programs/removeSolutions/:id" route is already declared consistently in both the interface and service route registries:

  • interface-routes/elevate-dev-routes.json:12561
  • elevate-project/constants/routes.js:3181, 3185

Nothing else required—approving these changes.


12518-12545: Confirmed: DELETE‐like admin routes use POST by design

  • Interface definition in interface-routes/elevate-dev-routes.json (lines 12519 & 12533)
  • Matching constants in elevate-survey/constants/routes.js (lines 2993–3007)

POST for /survey/v1/admin/deleteResource is consistent with project conventions and mappings are correct.


12546-12559: Add project programs/removeSolutions — route definitions found, please verify backend implementation

I’ve confirmed the new route is declared in the interface‐routes and client constants, but I haven’t been able to locate the actual service implementation. Please ensure the project service exposes a matching POST /project/v1/programs/removeSolutions endpoint.

Locations of the declarations:

  • interface-routes/elevate-dev-routes.json (lines 12547, 12561)
  • elevate-project/constants/routes.js (lines 3171, 3175, 3181, 3185)

@VISHNUDAS-tunerlabs VISHNUDAS-tunerlabs merged commit ad47201 into master Aug 13, 2025
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 14, 2025
This was referenced Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants