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 · 1 comment
Open
2 tasks done

🐛 Bug Report: #7282

ssoronid opened this issue Dec 12, 2024 · 1 comment
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:

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

2 participants