Skip to content
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

Nv 2578 add removeallnotifications method in headless package #3829

Merged

Conversation

BiswaViraj
Copy link
Member

What change does this PR introduce?

  • Added removeAllNotifications method to the Headless service
  • Added test
  • Exported types from the headless service
  • Updated the docs to use the imported types
  • Added docs for the removeAllNotifications

Why was this change needed?

Other information (Screenshots)

@linear
Copy link

linear bot commented Jul 20, 2023

NV-2578 Add removeAllNotifications method in headless package

What?

We recently added removeAllNotifications method in novu/notification-center react package to remove all in-app notifications with an optional params feedId

https://docs.novu.co/notification-center/react/api-reference#useremoveallnotifications

https://docs.novu.co/notification-center/react/api-reference#the-hook-return-interface

Why? (Context)

This method is missing in novu/headless library

Definition of Done

  1. Add this new method
  2. Write tests for this new method

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 20, 2023
@@ -1149,11 +1145,6 @@ describe('headless.service', () => {

describe('markAllMessagesAsSeen', () => {
test('calls markAllMessagesAsSeen successfully', async () => {
const updatedNotification = {
Copy link
Member Author

Choose a reason for hiding this comment

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

removed unused variable

@@ -1085,11 +1086,6 @@ describe('headless.service', () => {

describe('markAllMessagesAsRead', () => {
test('calls markAllMessagesAsRead successfully', async () => {
const updatedNotification = {
Copy link
Member Author

Choose a reason for hiding this comment

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

removed unused variable

@@ -1 +1,2 @@
export * from './headless.service';
export * from './types';
Copy link
Member Author

Choose a reason for hiding this comment

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

Exported the types to be accessible in the package imports

@@ -1 +1,2 @@
export * from './query-keys';
export * from './types';
Copy link
Member Author

Choose a reason for hiding this comment

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

Exported the types to be accessible in the package imports

@scopsy scopsy added this pull request to the merge queue Jul 24, 2023
Merged via the queue into next with commit 3fd7e5b Jul 24, 2023
@scopsy scopsy deleted the nv-2578-add-removeallnotifications-method-in-headless-package branch July 24, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants