Skip to content

fix(api-service): mark v1 in-app api as deprecated in favor of new inbox apis#10618

Draft
jainpawan21 wants to merge 2 commits intonextfrom
fix/subscribers-in-app-api-deprecate
Draft

fix(api-service): mark v1 in-app api as deprecated in favor of new inbox apis#10618
jainpawan21 wants to merge 2 commits intonextfrom
fix/subscribers-in-app-api-deprecate

Conversation

@jainpawan21
Copy link
Copy Markdown
Member

@jainpawan21 jainpawan21 commented Apr 7, 2026

What changed? Why was the change needed?

What changed

Updated multiple endpoints in SubscribersV1Controller to mark them as deprecated in favor of v2 APIs. Added deprecated: true to the Swagger @ApiOperation decorators and updated endpoint descriptions to direct users to use the v2 inbox APIs instead. This affects endpoints for retrieving notifications feed, unseen count, marking messages as seen/read, updating notification states, and updating notification action status. No runtime behavior changes—this is purely a documentation and API contract update.

Affected areas

api — Updated Swagger metadata for v1 in-app notification and subscriber preference endpoints in SubscribersV1Controller to mark them as deprecated and redirect consumers to v2 APIs.

Testing

No tests were added. The change is documentation-only and does not affect runtime behavior or data handling, so existing test coverage remains sufficient.

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer


Note

Low Risk
Low risk: only Swagger metadata/docstrings are updated to flag these v1 endpoints as deprecated; no runtime behavior or data handling changes.

Overview
Marks several SubscribersV1Controller in-app notification endpoints as deprecated in the OpenAPI docs by adding deprecated: true and updating descriptions to direct consumers to the v2 inbox APIs (feed retrieval, unseen count, message state updates, and action status updates).

Reviewed by Cursor Bugbot for commit 04b1c00. Configure here.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for dashboard-v2-novu-staging canceled.

Name Link
🔨 Latest commit f203c7c
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/69d53d10ef515a0008b8cfb7

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Hey there and thank you for opening this pull request! 👋

We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted.

Your PR title is: fix(api-service): mark v1 in-app api as deprecated in favor of new inbox apis

Requirements:

  1. Follow the Conventional Commits specification
  2. As a team member, include Linear ticket ID at the end: fixes TICKET-ID or include it in your branch name

Expected format: feat(scope): Add fancy new feature fixes NOV-123

Details:

PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

Updated Swagger/OpenAPI metadata for multiple v1 notification/feed/message endpoints in SubscribersV1Controller. Added deprecation notices to endpoint descriptions and marked endpoints with the deprecated: true property to indicate the v2 API migration path.

Changes

Cohort / File(s) Summary
Deprecation Metadata Updates
apps/api/src/app/subscribers/subscribersV1.controller.ts
Added deprecation notices to @ApiOperation decorators for v1 notification endpoints, marked endpoints with deprecated: true, and updated descriptions to direct users to v2 API.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • scopsy
🚥 Pre-merge checks | ✅ 3
✅ 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 follows Conventional Commits format with valid type 'fix' and scope 'api-service', uses imperative mood, and clearly describes marking v1 in-app API as deprecated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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
Contributor

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/api/src/app/subscribers/subscribersV1.controller.ts`:
- Around line 659-663: Update the ApiOperation description on the deprecated
markAs handler to consistently point to the v2 endpoint and remove the confusing
v1 path reference: edit the ApiOperation decorator (above the markAs method in
subscribersV1.controller.ts) so the description states that this API is
deprecated and directs consumers to the v2 path (e.g., the v2
'/subscribers/:subscriberId/messages/mark-as' endpoint) for consistent read/seen
handling, removing the mixed guidance that currently references the v1-style
path.
- Around line 691-693: The route description in subscribersV1.controller.ts
contains a duplicated deprecation sentence; open the description value for the
affected endpoint (the description property in the controller's route config)
and remove the repeated "This API is deprecated, use v2 API instead." so the
deprecation appears only once while preserving the rest of the explanatory text
and keeping deprecated: true unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 048da4ce-5388-4181-a03e-bce39674c454

📥 Commits

Reviewing files that changed from the base of the PR and between 2b0bc8f and f203c7c.

📒 Files selected for processing (1)
  • apps/api/src/app/subscribers/subscribersV1.controller.ts

Comment on lines 659 to 663
@ApiOperation({
summary: 'Mark a subscriber feed messages as seen or as read',
description: `Introducing '/:subscriberId/messages/mark-as endpoint for consistent read and seen message handling,
description: `This API is deprecated, use v2 API instead. Introducing '/:subscriberId/messages/mark-as endpoint for consistent read and seen message handling,
deprecating old legacy endpoint.`,
deprecated: true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify migration target in legacy markAs description.

Line 661 currently says to use v2, but the same sentence also says “introducing /:subscriberId/messages/mark-as,” which points to a v1 path and creates mixed guidance.

✏️ Suggested wording cleanup
   `@ApiOperation`({
     summary: 'Mark a subscriber feed messages as seen or as read',
-    description: `This API is deprecated, use v2 API instead. Introducing '/:subscriberId/messages/mark-as endpoint for consistent read and seen message handling,
-     deprecating old legacy endpoint.`,
+    description: `This API is deprecated, use v2 API instead. This legacy '/:subscriberId/messages/markAs' endpoint is maintained for backward compatibility only.`,
     deprecated: true,
   })
📝 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
@ApiOperation({
summary: 'Mark a subscriber feed messages as seen or as read',
description: `Introducing '/:subscriberId/messages/mark-as endpoint for consistent read and seen message handling,
description: `This API is deprecated, use v2 API instead. Introducing '/:subscriberId/messages/mark-as endpoint for consistent read and seen message handling,
deprecating old legacy endpoint.`,
deprecated: true,
`@ApiOperation`({
summary: 'Mark a subscriber feed messages as seen or as read',
description: `This API is deprecated, use v2 API instead. This legacy '/:subscriberId/messages/markAs' endpoint is maintained for backward compatibility only.`,
deprecated: true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/api/src/app/subscribers/subscribersV1.controller.ts` around lines 659 -
663, Update the ApiOperation description on the deprecated markAs handler to
consistently point to the v2 endpoint and remove the confusing v1 path
reference: edit the ApiOperation decorator (above the markAs method in
subscribersV1.controller.ts) so the description states that this API is
deprecated and directs consumers to the v2 path (e.g., the v2
'/subscribers/:subscriberId/messages/mark-as' endpoint) for consistent read/seen
handling, removing the mixed guidance that currently references the v1-style
path.

Comment on lines +691 to +693
description: `This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**.
**messageId** is of type mongodbId of notifications. This API is deprecated, use v2 API instead.`,
deprecated: true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicated deprecation sentence in description.

Line 691 and Line 692 repeat the same deprecation statement, which adds noise in generated docs.

✏️ Suggested wording cleanup
   `@ApiOperation`({
     summary: 'Update notifications state',
     description: `This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**. 
-      **messageId** is of type mongodbId of notifications. This API is deprecated, use v2 API instead.`,
+      **messageId** is of type mongodbId of notifications.`,
     deprecated: true,
   })
📝 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
description: `This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**.
**messageId** is of type mongodbId of notifications. This API is deprecated, use v2 API instead.`,
deprecated: true,
description: `This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**.
**messageId** is of type mongodbId of notifications.`,
deprecated: true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/api/src/app/subscribers/subscribersV1.controller.ts` around lines 691 -
693, The route description in subscribersV1.controller.ts contains a duplicated
deprecation sentence; open the description value for the affected endpoint (the
description property in the controller's route config) and remove the repeated
"This API is deprecated, use v2 API instead." so the deprecation appears only
once while preserving the rest of the explanatory text and keeping deprecated:
true unchanged.

@jainpawan21 jainpawan21 marked this pull request as draft April 7, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant