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

🐛 Bug Report: #7282

Open
2 tasks done
ssoronid opened this issue Dec 12, 2024 · 3 comments
Open
2 tasks done

🐛 Bug Report: #7282

ssoronid opened this issue Dec 12, 2024 · 3 comments
Assignees
Labels

Comments

@ssoronid
Copy link

📜 Description

It bugs out when I try to call novu.preferences.update...

im using

"@novu/js": "^2.6.3",

and having this issue, while lists functions perfectly, update is not:

TypeError: novuClient.preferences.update is not a function

Source
src\context\NotificationsContext.tsx (217:36) @ update

  215 |     
  216 |     try {
> 217 |       await novuClient.preferences.update({
      |                                    ^
  218 |         workflowId: workflowId || undefined, // If no workflowId, it updates global preferences
  219 |         channelPreferences, // This matches Novu's expected format
  220 |       });
 

👟 Reproduction steps

Create a novu client like this:

      const novu = new Novu({
        subscriberId: subscriberId,
        applicationIdentifier: process.env.NEXT_PUBLIC_NOVU_APP_ID!
      });
      
      setNovuClient(novu);

Then if we call list, it works:

        const response = await novuClient.preferences.list();
        return response.data || [];
        ```
        
        But update is not:
        
        ```
        TypeError: novuClient.preferences.update is not a function

Source
src\context\NotificationsContext.tsx (217:36) @ update

  215 |     
  216 |     try {
> 217 |       await novuClient.preferences.update({
      |                                    ^
  218 |         workflowId: workflowId || undefined, // If no workflowId, it updates global preferences
  219 |         channelPreferences, // This matches Novu's expected format
  220 |       });

👍 Expected behavior

it should be at least in the function as stated in the doc

👎 Actual Behavior with Screenshots

image

Novu version

"@novu/js": "^2.6.3",

npm version

No response

node version

20.9.0

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Copy link

linear bot commented Dec 12, 2024

NV-5032 🐛 Bug Report:

@fkiptooh-r
Copy link

Hi @ssoronid just experienced the same bug too, any response or solution concerning this bug will be highly appreciated.

@ssoronid
Copy link
Author

Hi! I didn't see any interests into guide me in the right direction and doesn't have the experience yet collaborating on PRs but I'm still in need to get this fixed... So I can Collaborate into proposing a fix.

In the meantime I think I should call another method to tackle this, but it's getting too mixed and out of our usecase that I'm thinking about making a simpler approach with a custom solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants