Party methods: update, delete
The Party Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Party, one group of Party methods.
Party.update
Changes the given properties of a Party. Verb page.
interface PartyVerbs {
update(input: PartyUpdateInput, options?: SB.CallOptions): SB.Call<Party>
}Emits Party.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Party. |
name | string | The legal or personal name. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
party | Party | required | The Party. |
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 party = await $.Party.update({ id: 'party_hmQWaPrAyZ', name: 'Leaseline' })Party.delete
Deletes a Party: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface PartyVerbs {
delete(input: PartyDeleteInput, options?: SB.CallOptions): SB.Call<Party>
}Emits Party.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Party. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
party | Party | required | The Party. |
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 party = await $.Party.delete({ id: 'party_hmQWaPrAyZ' })