Product commands: update, delete
The Product Verbs update, delete as CLI commands, with inputs, result, refusals and an example.
Reference for Product, one group of Product commands.
Product.update
Changes the given properties of a Product. Verb page.
npx startup-builder do Product.update --json '<input>' [--try | --send | --do]Emits Product.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Product. |
name | string | The name of the Product. | |
promise | text | What the Customer can rely on. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
product | Product | required | The Product. |
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 Product.update --json '{"id": "prod_MJmgS5dysq", "name": "Leaseline"}'Product.delete
Deletes a Product: a soft delete that keeps its history, undone by Thing.restore. Verb page.
npx startup-builder do Product.delete --json '<input>' [--try | --send | --do]Emits Product.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Product. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
product | Product | required | The Product. |
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 Product.delete --json '{"id": "prod_MJmgS5dysq"}'