npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@panora/frontend-sdk

v1.2.0

Published

It is a React component aimed to be used in any of your pages so end-users can connect their 3rd parties in 1-click!

Downloads

4

Readme

Frontend SDK (React)

It is a React component aimed to be used in any of your pages so end-users can connect their 3rd parties in 1-click!

Installation

npm i @panora/frontend-sdk

or

pnpm i @panora/frontend-sdk

or

yarn add @panora/frontend-sdk

Use the component

    import { ConnectorCategory } from '@panora/shared'
    import Panora from '@panora/frontend-sdk'

    const panora = new Panora({ apiKey: 'YOUR_PRIVATE_API_KEY' });

    // kickstart the connection (OAuth, ApiKey, Basic)
    panora.connect({
      providerName: "hubspot",
      vertical: ConnectorCategory.Crm,
      linkedUserId: "4c6ca51b-7b23-4e3a-9309-24d2d331a04d",
    })
The Panora SDK must be instantiated with this type:

interface PanoraConfig { 
  apiKey: string;
  overrideApiUrl: string; 
  // Optional (only if you are in selfhost mode and want to use localhost:3000), by default: api.panora.dev
}

The .connect() function takes this type:

interface ConnectOptions {
  providerName: string;
  vertical: ConnectorCategory; // Must be imported from @panora/shared
  linkedUserId: string; // You can copy it from your Panora dahsbord under /configuration tab
  credentials?: Credentials; // Optional if you try to use OAuth
  options?: {
    onSuccess?: () => void;
    onError?: (error: Error) => void;
    overrideReturnUrl?: string;
  }
}

By default, for OAuth we use Panora managed OAuth apps but if we dont have one registered OR you want to use your own, you must register that under /configuration tab from the webapp and it will automatically use these custom credentials !

interface Credentials {
  username?: string; // Used for Basic Auth
  password?: string; // Used for Basic Auth
  apiKey?: string; // Used for Api Key Auth
}

For Basic Auth some providers may only ask for username or password.

In this case just specify either password or username depending on the 3rd party reference.