Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
bedrock-account
Advanced tools
User accounts for Bedrock Applications
object
| null
| undefined
An Actor may be an Object, undefined or null.
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
object
Promise
Inserts a new Account. The Account must contain id
.
Kind: static method of bedrock-account
Returns: Promise
- Resolves to the database account record.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.actor | Actor | The actor or capabilities for performing the action. |
options.account | object | The account containing at least the minimum required data. |
[options.meta] | object | The meta information to include. |
Promise
Check for the existence of an account.
Kind: static method of bedrock-account
Returns: Promise
- Resolves to a boolean indicating account existence.
Param | Type | Default | Description |
---|---|---|---|
options | object | The options to use. | |
options.actor | Actor | The actor or capabilities for performing the action. | |
[options.id] | string | The ID of the account to check. | |
[options.email] | string | The email address for the account. | |
[options.status] | string | "active" | The status to check for (options: 'active', deleted'). |
Promise
Retrieves an Account.
Kind: static method of bedrock-account
Returns: Promise
- Resolves to {account, meta}
.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.actor | Actor | The actor or capabilities for performing the action. |
options.id | string | The ID of the Account to retrieve. |
Promise
Retrieves all Accounts matching the given query.
Kind: static method of bedrock-account
Returns: Promise
- Resolves to the records that matched the query.
Param | Type | Default | Description |
---|---|---|---|
options | object | The options to use. | |
options.actor | Actor | The 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'). |
Promise
Updates an Account.
Kind: static method of bedrock-account
Returns: Promise
- Resolves once the operation completes.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.actor | Actor | The actor or capabilities to perform the action. |
options.id | string | The ID of the account to update. |
options.patch | Array | A JSON patch for performing the update. |
options.sequence | number | The sequence number that must match the current record prior to the patch. |
Promise
Sets an Account's status.
Kind: static method of bedrock-account
Returns: Promise
- Resolves once the operation completes.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.actor | Actor | The actor or capabilities to perform the action. |
options.id | string | The Account ID. |
options.status | string | The status. |
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.
Param | Type | Default | Description |
---|---|---|---|
options | object | The options to use. | |
options.actor | Actor | The actor or capabilities to perform the action. | |
options.id | string | The ID of the Account that is to be updated. | |
[options.add] | Array | [] | The resourceRoles to add. |
[options.remove] | Array | [] | The resourceRoles to remove. |
options.sequence | number | The sequence number that must match the current record prior to the patch. |
Promise
Gets the capabilities for a given account.
Kind: static method of bedrock-account
Returns: Promise
- Resolves to an actor
once the operation completes.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.id | string | The ID of the Account to get the capabilities for. |
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.
Param | Type | Description |
---|---|---|
options | object | The options to use. |
options.role | object | The role to transform. |
options.id | string | The ID to insert into the resource array. |
object
| null
| undefined
An Actor may be an Object, undefined or null.
Kind: global typedef
FAQs
User accounts for Bedrock applications
We found that bedrock-account demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.