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

bedrock-account

Package Overview
Dependencies
Maintainers
5
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

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
5
Weekly downloads
 
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 ⇒ Promise

Inserts a new Account. The Account must contain id.

Kind: static property 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 ⇒ Promise

Check for the existence of an account.

Kind: static property 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 ⇒ Promise

Retrieves an Account.

Kind: static property 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 ⇒ Promise

Retrieves all Accounts matching the given query.

Kind: static property 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]Object{}The fields to include or exclude.
[options.options]Object{}The options (eg: 'sort', 'limit').

bedrock-account.update ⇒ Promise

Updates an Account.

Kind: static property 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 ⇒ Promise

Sets an Account's status.

Kind: static property 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 ⇒ Promise

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

Kind: static property 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.

bedrock-account.getCapabilities ⇒ Promise

Gets the capabilities for a given account.

Kind: static property 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.
[options.identities]ArrayA set of identity IDs to restrict capabitilies to; if unspecified, all identity capabilities will be included.

bedrock-account.manageIdentity ⇒ Promise

Assumes management over the given identity.

Note This method requires the capability to update the identity. This means that the actor must have authenticated as that identity (i.e. actor must include the capability to update the identity).

Kind: static property 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.accountIdstringThe ID of the account to make the manager of an identity.
options.identityIdstringThe ID of the identity to manage.

bedrock-account.getManagerId ⇒ Promise

Retrieves the ID of the Account that manages the given identity or null if there is no managing account set.

Kind: static property of bedrock-account
Returns: Promise - Resolves to the account ID or null.

ParamTypeDescription
optionsObjectThe options to use.
options.actorActorThe actor or capabilities for performing the action.
options.identitystringThe ID of the identity to get the managing Account 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 15 Apr 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