Trigger commands: update, delete
The Trigger Verbs update, delete as CLI commands, with inputs, result, refusals and an example.
Reference for Trigger, one group of Trigger commands.
Trigger.update
Changes the given properties of a Trigger. Verb page.
npx startup-builder do Trigger.update --json '<input>' [--try | --send | --do]Emits Trigger.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Trigger. |
event | string | The Event selector it matches, such as Order.placed. | |
schedule | string | A cadence or cron expression. | |
where | string | The predicate an event Trigger matches, such as choice = 'raise'. | |
threshold | json | A Metric staying below or above a value, optionally for a while, such as four weeks. | |
at | string | When in its cadence a schedule runs, on the namespace’s clock, such as mon 09:. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
trigger | Trigger | required | The Trigger. |
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
npx startup-builder do Trigger.update --json '{"id": "trigger_Hg9n0lrBdP", "threshold": {}}'Trigger.delete
Deletes a Trigger: a soft delete that keeps its history, undone by Thing.restore. Verb page.
npx startup-builder do Trigger.delete --json '<input>' [--try | --send | --do]Emits Trigger.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Trigger. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
trigger | Trigger | required | The Trigger. |
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
npx startup-builder do Trigger.delete --json '{"id": "trigger_Hg9n0lrBdP"}'