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

bedrock-web-account

v2.1.0

Published

User Account APIs for Bedrock Web Apps

Downloads

9

Readme

bedrock-web-account

User account APIs for Bedrock Web Apps

API Reference

Classes

Typedefs

AccountService

This service is used to encapsulate all account based activity for a project.

Kind: global class

new exports.AccountService([config])

| Param | Type | Default | | --- | --- | --- | | [config] | Object | {urls: {base: '/accounts'}} | | [config.urls] | Object | {} | | [config.urls.base] | string | "/accounts" |

accountService.exists(options) ⇒ Boolean

On 200 exists returns true on error if it is a NotFoundError we return false in all other cases we forward the error to the project.

Kind: instance method of AccountService
Returns: Boolean - exists

| Param | Type | Default | | --- | --- | --- | | options | Object | | | [options.baseUrl] | string | "/accounts" | | options.email | string | |

accountService.create(options) ⇒ Object

Takes a url and an email then creates an account for a user.

Kind: instance method of AccountService

| Param | Type | Default | | --- | --- | --- | | options | Object | | | [options.url] | string | "/accounts" | | options.email | string | |

accountService.get(options) ⇒ Object

Takes a url and an id and finds a single account.

Kind: instance method of AccountService
Returns: Object - an account

| Param | Type | Default | | --- | --- | --- | | options | Object | | | [options.baseUrl] | string | "/accounts" | | options.id | string | |

accountService.getAll(options) ⇒ Array

Returns all accounts that match the given query parameters.

Kind: instance method of AccountService
Returns: Array - data

| Param | Type | Default | Description | | --- | --- | --- | --- | | options | Object | | | | [options.baseUrl] | string | "/accounts" | The base baseUrl. | | options.email | string | | The user's email. | | [options.after] | string | null | An account's ID. | | [options.limit] | number | 10 | How many accounts to return. |

accountService.update(options) ⇒ Void

Updates an account via a series of json patches patches need to be in the:

json patch format we use fast-json for handling json patches.

Kind: instance method of AccountService

| Param | Type | Default | Description | | --- | --- | --- | --- | | options | Object | | | | [options.baseUrl] | string | "/accounts" | | | options.id | string | | An account's id. | | options.sequence | number | | An account's sequence number. | | config.patch | Array.<Object> | | A JSON patch per RFC6902. |

accountService.setStatus(options) ⇒ Void

Takes an id and a status string then changes an account's status.

Kind: instance method of AccountService

| Param | Type | Default | Description | | --- | --- | --- | --- | | options | Object | | | | [options.baseUrl] | string | "/accounts" | | | options.id | string | | An account id. | | options.status | StatusType | | one of 3 status types |

accountService.getRoles(options) ⇒ Array.<Object>

Takes an account's id and returns all sysRoles for it.

Kind: instance method of AccountService

| Param | Type | Default | Description | | --- | --- | --- | --- | | options | Object | | | | [options.baseUrl] | string | "/accounts" | | | options.id | string | | An account id. |

RegisterController

Encapsulates the registration methods.

Kind: global class

new exports.RegisterController(options)

| Param | Type | Default | | --- | --- | --- | | options | Object | | | [options.debounceExists] | number | 500 | | [options.accountServiceConfig] | Object | {} |

registerController.exists()

Exists is a debounced method used to check if an email already exists during registration.

Kind: instance method of RegisterController

registerController.register()

Registers a user then sets registering to false.

Kind: instance method of RegisterController

StatusType : "active" | "disabled" | "deleted"

Kind: global typedef


Copyright (c) 2018-2019 Digital Bazaar, Inc. All rights reserved.