Person methods: update, delete
The Person Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Person, one group of Person methods.
Person.update
Changes the given properties of a Person. Verb page.
interface PersonVerbs {
update(input: PersonUpdateInput, options?: SB.CallOptions): SB.Call<Person>
}Emits Person.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Person. |
name | string | The legal or personal name. | |
verified | boolean | True once the identity is verified. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
person | Person | required | The Person. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const person = await $.Person.update({ id: 'person_sLqbXbW683', verified: true })Person.delete
Deletes a Person: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface PersonVerbs {
delete(input: PersonDeleteInput, options?: SB.CallOptions): SB.Call<Person>
}Emits Person.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Person. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
person | Person | required | The Person. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const person = await $.Person.delete({ id: 'person_sLqbXbW683' })