Service methods: update, delete
The Service Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Service, one group of Service methods.
Service.update
Changes the given properties of a Service. Verb page.
interface ServiceVerbs {
update(input: ServiceUpdateInput, options?: SB.CallOptions): SB.Call<Service>
}Emits Service.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Service. |
name | string | The name of the Product. | |
promise | text | What the Customer can rely on. | |
floor | string | The human floor: none, sign, or practice. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
service | Service | required | The Service. |
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 service = await $.Service.update({ id: 'service_Eq1ssq4AOW', floor: 'none' })Service.delete
Deletes a Service: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface ServiceVerbs {
delete(input: ServiceDeleteInput, options?: SB.CallOptions): SB.Call<Service>
}Emits Service.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Service. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
service | Service | required | The Service. |
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 service = await $.Service.delete({ id: 'service_Eq1ssq4AOW' })