Skip to content

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.

TypeScript
interface ServiceVerbs {
  update(input: ServiceUpdateInput, options?: SB.CallOptions): SB.Call<Service>
}

Emits Service.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Service.
namestringThe name of the Product.
promisetextWhat the Customer can rely on.
floorstringThe human floor: none, sign, or practice.

Returns

OutputTypeRequiredDescription
serviceServicerequiredThe Service.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

TypeScript
interface ServiceVerbs {
  delete(input: ServiceDeleteInput, options?: SB.CallOptions): SB.Call<Service>
}

Emits Service.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Service.

Returns

OutputTypeRequiredDescription
serviceServicerequiredThe Service.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const service = await $.Service.delete({ id: 'service_Eq1ssq4AOW' })