Goal methods: update, delete
The Goal Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Goal, one group of Goal methods.
Goal.update
Changes the given properties of a Goal. Verb page.
interface GoalVerbs {
update(input: GoalUpdateInput, options?: SB.CallOptions): SB.Call<Goal>
}Emits Goal.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Goal. |
objective | text | The qualitative outcome. | |
horizon | string | One of day, week, quarter, year, or three-years. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
goal | Goal | required | The Goal. |
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 goal = await $.Goal.update({ id: 'goal_L9PBQQhfuF', horizon: 'day' })Goal.delete
Deletes a Goal: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface GoalVerbs {
delete(input: GoalDeleteInput, options?: SB.CallOptions): SB.Call<Goal>
}Emits Goal.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Goal. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
goal | Goal | required | The Goal. |
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 goal = await $.Goal.delete({ id: 'goal_L9PBQQhfuF' })