Variant commands: update, delete
The Variant Verbs update, delete as CLI commands, with inputs, result, refusals and an example.
Reference for Variant, one group of Variant commands.
Variant.update
Changes the given properties of a Variant. Verb page.
npx startup-builder do Variant.update --json '<input>' [--try | --send | --do]Emits Variant.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Variant. |
key | string | The name the Flag returns for it. | |
value | json | What it changes: copy, behavior, a definition Version, or a Thing. | |
control | boolean | True for the current definition every challenger is judged against. | |
follows | Variant | The Variant it was drafted from by a learn step. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
variant | Variant | required | The Variant. |
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 Variant.update --json '{"id": "variant_nvdfmt7dTw", "value": {}}'Variant.delete
Deletes a Variant: a soft delete that keeps its history, undone by Thing.restore. Verb page.
npx startup-builder do Variant.delete --json '<input>' [--try | --send | --do]Emits Variant.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Variant. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
variant | Variant | required | The Variant. |
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 Variant.delete --json '{"id": "variant_nvdfmt7dTw"}'