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

feat(js, react, shared): user agents #6626

Merged

Conversation

BiswaViraj
Copy link
Member

What changed? Why was the change needed?

  • added novu-user-agent header

Screenshots

image
image

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

linear bot commented Oct 4, 2024

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit c593b87
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/66ffe9795a9ad600088aa82a
😎 Deploy Preview https://deploy-preview-6626--novu-stg-vite-dashboard-poc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

/**
* @internal Should be used internally
*/
__userAgent?: string;
Copy link
Member Author

@BiswaViraj BiswaViraj Oct 4, 2024

Choose a reason for hiding this comment

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

couldn't find a better way to make it not expose to the public
Let me know if there's a better approach.
This __userAgent will appear in the autocomplete list if someone tries to initialise the Novu class from the @novu/js package:

 const novu = new Novu()

Copy link
Contributor

Choose a reason for hiding this comment

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

The only other alternative is not to add a property at all and add a ts ignore when you use it ;)

Copy link

pkg-pr-new bot commented Oct 4, 2024

Open in Stackblitz

novu

pnpm add https://pkg.pr.new/novuhq/novu@6626

@novu/client

pnpm add https://pkg.pr.new/novuhq/novu/@novu/client@6626

@novu/headless

pnpm add https://pkg.pr.new/novuhq/novu/@novu/headless@6626

@novu/framework

pnpm add https://pkg.pr.new/novuhq/novu/@novu/framework@6626

@novu/js

pnpm add https://pkg.pr.new/novuhq/novu/@novu/js@6626

@novu/node

pnpm add https://pkg.pr.new/novuhq/novu/@novu/node@6626

@novu/notification-center

pnpm add https://pkg.pr.new/novuhq/novu/@novu/notification-center@6626

@novu/providers

pnpm add https://pkg.pr.new/novuhq/novu/@novu/providers@6626

@novu/react

pnpm add https://pkg.pr.new/novuhq/novu/@novu/react@6626

@novu/shared

pnpm add https://pkg.pr.new/novuhq/novu/@novu/shared@6626

commit: c593b87

/**
* @internal Should be used internally
*/
__userAgent?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

The only other alternative is not to add a property at all and add a ts ignore when you use it ;)

@BiswaViraj BiswaViraj merged commit 1142df0 into next Oct 4, 2024
38 of 40 checks passed
@BiswaViraj BiswaViraj deleted the com-240-pass-parameters-to-initialize-session-analytics-for branch October 4, 2024 16:49
tatarco pushed a commit that referenced this pull request Oct 7, 2024
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.

2 participants