-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(api-service): mark v1 in-app api as deprecated in favor of new inbox apis #10618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -584,7 +584,8 @@ export class SubscribersV1Controller { | |||||||||||||
| @Get('/:subscriberId/notifications/feed') | ||||||||||||||
| @ApiOperation({ | ||||||||||||||
| summary: 'Retrieve subscriber notifications', | ||||||||||||||
| description: `Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**.`, | ||||||||||||||
| description: `This API is deprecated, use v2 API instead. Retrieve subscriber in-app notifications by its unique key identifier **subscriberId**.`, | ||||||||||||||
| deprecated: true, | ||||||||||||||
| }) | ||||||||||||||
| @ApiResponse(FeedResponseDto) | ||||||||||||||
| @SdkGroupName('Subscribers.Notifications') | ||||||||||||||
|
|
@@ -619,7 +620,8 @@ export class SubscribersV1Controller { | |||||||||||||
| @ApiResponse(UnseenCountResponse) | ||||||||||||||
| @ApiOperation({ | ||||||||||||||
| summary: 'Retrieve unseen notifications count', | ||||||||||||||
| description: `Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier **subscriberId**.`, | ||||||||||||||
| description: `This API is deprecated, use v2 API instead. Retrieve unseen in-app notifications count for a subscriber by its unique key identifier **subscriberId**.`, | ||||||||||||||
| deprecated: true, | ||||||||||||||
| }) | ||||||||||||||
| @SdkGroupName('Subscribers.Notifications') | ||||||||||||||
| @SdkMethodName('unseenCount') | ||||||||||||||
|
|
@@ -656,7 +658,7 @@ export class SubscribersV1Controller { | |||||||||||||
| @Post('/:subscriberId/messages/markAs') | ||||||||||||||
| @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, | ||||||||||||||
| }) | ||||||||||||||
|
|
@@ -686,8 +688,9 @@ export class SubscribersV1Controller { | |||||||||||||
|
|
||||||||||||||
| @ApiOperation({ | ||||||||||||||
| summary: 'Update notifications state', | ||||||||||||||
| description: `Update subscriber's multiple in-app (inbox) notifications state such as seen, read, unseen or unread by **subscriberId**. | ||||||||||||||
| **messageId** is of type mongodbId of notifications`, | ||||||||||||||
| 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, | ||||||||||||||
|
Comment on lines
+691
to
+693
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| }) | ||||||||||||||
| @ExternalApiAccessible() | ||||||||||||||
| @RequireAuthentication() | ||||||||||||||
|
|
@@ -720,7 +723,8 @@ export class SubscribersV1Controller { | |||||||||||||
| @Post('/:subscriberId/messages/mark-all') | ||||||||||||||
| @ApiOperation({ | ||||||||||||||
| summary: 'Update all notifications state', | ||||||||||||||
| description: `Update all subscriber in-app (inbox) notifications state such as read, unread, seen or unseen by **subscriberId**.`, | ||||||||||||||
| description: `This API is deprecated, use v2 API instead. Update all subscriber in-app notifications state such as read, unread, seen or unseen by **subscriberId**.`, | ||||||||||||||
| deprecated: true, | ||||||||||||||
| }) | ||||||||||||||
| @ApiCreatedResponse({ | ||||||||||||||
| type: Number, | ||||||||||||||
|
|
@@ -750,8 +754,9 @@ export class SubscribersV1Controller { | |||||||||||||
| @Post('/:subscriberId/messages/:messageId/actions/:type') | ||||||||||||||
| @ApiOperation({ | ||||||||||||||
| summary: 'Update notification action status', | ||||||||||||||
| description: `Update in-app (inbox) notification's action status by its unique key identifier **messageId** and type field **type**. | ||||||||||||||
| description: `This API is deprecated, use v2 API instead. Update in-app notification's action status by its unique key identifier **messageId** and type field **type**. | ||||||||||||||
| **type** field can be **primary** or **secondary**`, | ||||||||||||||
| deprecated: true, | ||||||||||||||
| }) | ||||||||||||||
| @ApiResponse(MessageResponseDto, 201) | ||||||||||||||
| @SdkGroupName('Subscribers.Messages') | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify migration target in legacy
markAsdescription.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
🤖 Prompt for AI Agents