Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bedrock-account

Package Overview
Dependencies
Maintainers
6
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bedrock-account

User accounts for Bedrock applications

  • 4.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

bedrock-account

User accounts for Bedrock Applications

API Reference

Modules

bedrock-account

Typedefs

Actor : object | null | undefined

An Actor may be an Object, undefined or null.

bedrock-account

bedrock-account.insert(options) ⇒ Promise

Inserts a new Account. The Account must contain id.

Kind: static method of bedrock-account
Returns: Promise - Resolves to the database account record.

ParamTypeDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities for performing the action.
options.accountobjectThe account containing at least the minimum required data.
[options.meta]objectThe meta information to include.

bedrock-account.exists(options) ⇒ Promise

Check for the existence of an account.

Kind: static method of bedrock-account
Returns: Promise - Resolves to a boolean indicating account existence.

ParamTypeDefaultDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities for performing the action.
[options.id]stringThe ID of the account to check.
[options.email]stringThe email address for the account.
[options.status]string"active"The status to check for (options: 'active', deleted').

bedrock-account.get(options) ⇒ Promise

Retrieves an Account.

Kind: static method of bedrock-account
Returns: Promise - Resolves to {account, meta}.

ParamTypeDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities for performing the action.
options.idstringThe ID of the Account to retrieve.

bedrock-account.getAll(options) ⇒ Promise

Retrieves all Accounts matching the given query.

Kind: static method of bedrock-account
Returns: Promise - Resolves to the records that matched the query.

ParamTypeDefaultDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities for performing the action.
[options.query]object{}The query to use.
[options.fields]objectThe fields to include or exclude.
[options.options]object{}The options (eg: 'sort', 'limit').

bedrock-account.update(options) ⇒ Promise

Updates an Account.

Kind: static method of bedrock-account
Returns: Promise - Resolves once the operation completes.

ParamTypeDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities to perform the action.
options.idstringThe ID of the account to update.
options.patchArrayA JSON patch for performing the update.
options.sequencenumberThe sequence number that must match the current record prior to the patch.

bedrock-account.setStatus(options) ⇒ Promise

Sets an Account's status.

Kind: static method of bedrock-account
Returns: Promise - Resolves once the operation completes.

ParamTypeDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities to perform the action.
options.idstringThe Account ID.
options.statusstringThe status.

bedrock-account.updateRoles(options) ⇒ Promise

Sets the Account's ResourceRoles from the given resource roles arrays.

Kind: static method of bedrock-account
Returns: Promise - Resolves once the operation completes.

ParamTypeDefaultDescription
optionsobjectThe options to use.
options.actorActorThe actor or capabilities to perform the action.
options.idstringThe ID of the Account that is to be updated.
[options.add]Array[]The resourceRoles to add.
[options.remove]Array[]The resourceRoles to remove.
options.sequencenumberThe sequence number that must match the current record prior to the patch.

bedrock-account.getCapabilities(options) ⇒ Promise

Gets the capabilities for a given account.

Kind: static method of bedrock-account
Returns: Promise - Resolves to an actor once the operation completes.

ParamTypeDescription
optionsobjectThe options to use.
options.idstringThe ID of the Account to get the capabilities for.

bedrock-account.generateResource(options) ⇒ object

Inserts a specified ID into a role's resource restriction array. The given role is copied and the given ID is inserted into the new role's resource restriction array.

Kind: static method of bedrock-account
Returns: object - The transformed role.

ParamTypeDescription
optionsobjectThe options to use.
options.roleobjectThe role to transform.
options.idstringThe ID to insert into the resource array.

Actor : object | null | undefined

An Actor may be an Object, undefined or null.

Kind: global typedef

Keywords

FAQs

Package last updated on 20 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc