Methods
(async, static) createPerson(payload) → {Promise}
Creates a new person with the provided information.
Parameters:
Name | Type | Description |
---|---|---|
payload |
Person
|
An object that contains information about a person. |
Returns:
- Type:
-
Promise
The created person.
(async, static) deletePerson(email) → {Promise}
Deletes the person with the provided e-mail.
Parameters:
Name | Type | Description |
---|---|---|
email |
String
|
The e-mail of the person. |
Returns:
- Type:
-
Promise
Empty response.
(async, static) getPerson(email) → {Promise}
Returns the person with the provided e-mail.
Parameters:
Name | Type | Description |
---|---|---|
email |
String
|
The e-mail of the person. |
Returns:
- Type:
-
Promise
The person requested.
(async, static) listPersons(options) → {Promise}
Returns all persons in the registry.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
An object of options to configure the query and its results. |
Returns:
- Type:
-
Promise
The person result list.
(async, static) updatePerson(email, payload) → {Promise}
Updates the person with the provided information.
Parameters:
Name | Type | Description |
---|---|---|
email |
String
|
The e-mail of the person. |
payload |
Object
|
An object that contains information about a person. |
Returns:
- Type:
-
Promise
The updated person.