Guard methods: update, delete
The Guard Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Guard, one group of Guard methods.
Guard.update
Changes the given properties of a Guard. Verb page.
interface GuardVerbs {
update(input: GuardUpdateInput, options?: SB.CallOptions): SB.Call<Guard>
}Emits Guard.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Guard. |
tier | string | One of code, model, reviewer, or human. | |
checks | string | What it refuses; a claim Guard checks a stated term or promise against the record that backs it. Never randomized. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
guard | Guard | required | The Guard. |
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 guard = await $.Guard.update({ id: 'guard_WtKo3jQi6J', tier: 'code' })Guard.delete
Deletes a Guard: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface GuardVerbs {
delete(input: GuardDeleteInput, options?: SB.CallOptions): SB.Call<Guard>
}Emits Guard.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Guard. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
guard | Guard | required | The Guard. |
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 guard = await $.Guard.delete({ id: 'guard_WtKo3jQi6J' })