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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bodhi-client

v1.0.6

Published

client API authentication and connection

Readme

bodhi-client

Installation

Install the package with:

npm install bodhi-client 
# or
yarn add bodhi-client 

Usage

Import bodhiClient to your app:

  const bodhiClient = require('bodhi-client') 

Initiate new instance of bodhiClient:

let example = new bodhiClient({
 clientId: "loginClientId",
 url:  "https://example.com",
 apiUrl: "https://example1.com",
 apiVersion: "v1",
})

Login:

// login as user
example.auth.login({
    type: 'user',
    userName: '[email protected]',  
    password: 'password',
});

// login as client
example.auth.login({
    type: 'client',
    userName: 'example',  
    password: 'loginClientIdSecret',
});

// login with token
example.auth.login({
    type: 'login', 
    token: 'token', 
})

Domain usage (User and client method)

List domains:

// get all domains
example.domain.list() 

// return all domains that match all the filter attributes
example.domain.list({filter{any:any}}) 

Domains filter list: will return any domains that match all the filter attributes
| Attribute | Type | Required | | --------- | -------- | ---------- | | id | String | No | | name | String | No |

Get domains:

// return a domain that match's the id if exist
example.domain.get({id: 'String'}) 

User usage (User and client method)

List users:

// return all users
example.user.list() 

// return all userss that match all the filter attributes
example.user.list({filter{any:any}}) 

Users filter list: will return any users that match all the filter attributes
| Attribute | Type | Required | | --------------- | -------- | ---------- | | id | String | No | | name | String | No | | firstName | String | No | | lastName | String | No | | email | String | No | | firebaseId | String | No | | keycloakId | String | No | | partnerId | String | No |

Get users:

// return a user that match's the id if exist
example.user.get({id: 'String'}) 

Type usage (User and client method)

List types:

// return all types that match all the filter attributes 
example.type.list({filter{any:any}})

Types filter list: will return any types that match all the filter attributes
| Attribute | Type | Required | | --------------- | -------- | ---------- | | id | String | No | | name | String | No | | parentType | String | Yes |

Get types:

// return a type that match's the id if exist
example.type.get({id: 'String'})

Create types:

// return the new type 
example.type.create({name:"String",parentType:"String"})

Update types:

// return the new type 
example.type.update({id:"String",parentType:"String"}) 

Types update data list: | Attribute | Type | Required | | --------------- | -------- | ---------- | | name | String | No | | parentType | String | no |

Delete types:

// return empty object
example.type.delete({id:"String"}) 

Partner usage (User and client method)

List partners:

// return all partners
example.partner.list() 

// return all partners that match all the filter attributes
example.partner.list({filter{any:any}}) 

Partners filter list: will return any partners that match all the filter attributes
| Attribute | Type | Required | | --------------- | -------- | ---------- | | id | String | No | | name | String | No | | typeId | String | No | | logoUrl | String | No |

Get partners:

// return a partner that match's the id if exist
example.partner.get({id: 'String'}) 

Permissions Usage (User and client method)

List permissions:

// return all permissions
example.permissions.list() 

Profile Usage (User methods)

Get profile:

// return a profile that match's the id if exist
example.profile.get() 

Update profile:

// will update your partner
example.partner.update({any:any}) 

Profile parameters list: will return any profile that match all the filter attributes
| Attribute | Type | Required | | --------------- | -------- | ---------- | | name | String | No | | phone | String | No | | email | String | No | | partnerId | String | No | | preferences | Object | No |

Preferences list: | Attribute | Type | Required | | -------------------- | -------- | ---------- | | defaultDomainId | String | No | | defaultLanguage | String | No | | defaultApplication | String | No | | notificationsEmail | Boolean | No | | notificationsSms | Boolean | No |