Skip to content

routes-for-library-flow#359

Merged
VISHNUDAS-tunerlabs merged 1 commit intomasterfrom
LibraryFlowSurvey
Oct 14, 2025
Merged

routes-for-library-flow#359
VISHNUDAS-tunerlabs merged 1 commit intomasterfrom
LibraryFlowSurvey

Conversation

@MallanagoudaB
Copy link
Copy Markdown
Collaborator

@MallanagoudaB MallanagoudaB commented Oct 13, 2025

Summary by CodeRabbit

  • New Features
    • Added API endpoints to create child project templates.
    • Added endpoints to publish programs to the library.
    • Added endpoints to update programs for library (bulk and by ID).
    • Added survey endpoint to fetch program details.
  • Chores
    • Incremented package versions to reflect the updates.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 13, 2025

Walkthrough

Adds new POST routes for project and survey services, including child project template creation, program publish/update to library, and survey program details fetch. The project routes are added twice. Bumps package versions: elevate-project 1.1.50→1.1.51 and elevate-survey 1.0.19→1.0.20.

Changes

Cohort / File(s) Summary of Changes
Project routes
elevate-project/constants/routes.js
Added four POST routes: /project/v1/project/templates/createChildProjectTemplate, /project/v1/programs/publishToLibrary, /project/v1/programs/ProgramUpdateForLibrary, /project/v1/programs/ProgramUpdateForLibrary/:id. Same four entries duplicated later in the file.
Survey routes
elevate-survey/constants/routes.js
Added POST route: /survey/v1/programs/fetchProgramDetails.
Version bumps
elevate-project/package.json, elevate-survey/package.json
Version updates: elevate-project 1.1.501.1.51; elevate-survey 1.0.191.0.20.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant GW as API Gateway
  participant PRJ as Project Service
  participant SRV as Survey Service

  rect rgba(230,245,255,0.5)
  note over C,GW: New project routes
  C->>GW: POST /project/v1/... (createChildProjectTemplate|publishToLibrary|ProgramUpdateForLibrary[:id])
  GW->>PRJ: Forward same POST path
  PRJ-->>GW: Response (200/4xx)
  GW-->>C: Response
  end

  rect rgba(240,255,230,0.5)
  note over C,GW: New survey route
  C->>GW: POST /survey/v1/programs/fetchProgramDetails
  GW->>SRV: Forward same POST path
  SRV-->>GW: Response (200/4xx)
  GW-->>C: Response
  end

  note over GW: Note: Project routes added twice in config
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • VISHNUDAS-tunerlabs

Poem

I thump my paws—new paths to hop!
Templates sprout, programs pop.
Survey burrows fetch the lore,
Version carrots—one bite more.
Routes in pairs? I’ll neatly sort—
A tidy warren is my sport. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “routes-for-library-flow” directly reflects the core change of the pull request, which is the addition of new routes to support the library flow, and does so in a concise and clear manner that a teammate can quickly understand.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch LibraryFlowSurvey

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 0

🧹 Nitpick comments (1)
elevate-project/constants/routes.js (1)

730-751: Consider using consistent naming convention.

The route path "ProgramUpdateForLibrary" uses PascalCase, which is inconsistent with the naming convention used in adjacent routes like "publishToLibrary" (camelCase). For consistency and to follow common REST API naming conventions, consider renaming to "programUpdateForLibrary".

Apply this diff to standardize the naming:

         {
-            sourceRoute: "/project/v1/programs/ProgramUpdateForLibrary",
+            sourceRoute: "/project/v1/programs/programUpdateForLibrary",
             type: "POST",
             inSequence: false,
             orchestrated: false,
             targetRoute: {
-                path: "/project/v1/programs/ProgramUpdateForLibrary",
+                path: "/project/v1/programs/programUpdateForLibrary",
                 type: "POST"
             },
             service: "project"
         },
         {
-            sourceRoute: "/project/v1/programs/ProgramUpdateForLibrary/:id",
+            sourceRoute: "/project/v1/programs/programUpdateForLibrary/:id",
             type: "POST",
             inSequence: false,
             orchestrated: false,
             targetRoute: {
-                path: "/project/v1/programs/ProgramUpdateForLibrary/:id",
+                path: "/project/v1/programs/programUpdateForLibrary/:id",
                 type: "POST"
             },
             service: "project"
         },

Note: Ensure that any client code or documentation referencing these endpoints is also updated.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24fbaa8 and 5ba16c9.

📒 Files selected for processing (4)
  • elevate-project/constants/routes.js (2 hunks)
  • elevate-project/package.json (1 hunks)
  • elevate-survey/constants/routes.js (1 hunks)
  • elevate-survey/package.json (1 hunks)
🔇 Additional comments (4)
elevate-survey/package.json (1)

3-3: LGTM!

The version bump from 1.0.19 to 1.0.20 appropriately reflects the addition of a new route in the elevate-survey service.

elevate-project/package.json (1)

3-3: LGTM!

The version bump from 1.1.50 to 1.1.51 appropriately reflects the addition of new routes in the elevate-project service.

elevate-survey/constants/routes.js (1)

421-431: LGTM!

The new route for fetching program details follows the established pattern and is correctly configured as a POST endpoint. The structure is consistent with other routes in the file.

elevate-project/constants/routes.js (1)

477-487: No duplicate route definitions found.

Each rg match corresponds to the sourceRoute and its paired targetRoute.path within a single entry; no redundant routes exist.

Copy link
Copy Markdown
Collaborator

@VISHNUDAS-tunerlabs VISHNUDAS-tunerlabs left a comment

Choose a reason for hiding this comment

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

Reviewed on 13 oct 21:00

@VISHNUDAS-tunerlabs VISHNUDAS-tunerlabs merged commit 1e2b8b5 into master Oct 14, 2025
1 check passed
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