Skip to content

Setting methods: update, delete

The Setting Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for Setting, one group of Setting methods.

Setting.update

Changes the given properties of a Setting. Verb page.

TypeScript
interface SettingVerbs {
  update(input: SettingUpdateInput, options?: SB.CallOptions): SB.Call<Setting>
}

Emits Setting.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Setting.
keystringThe name of the choice.
valuejsonThe chosen value.
lockedbooleanTrue when no holder below may override it.

Returns

OutputTypeRequiredDescription
settingSettingrequiredThe Setting.

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 setting = await $.Setting.update({ id: 'setting_mfZPXxFQYD', value: {} })

Setting.delete

Deletes a Setting: a soft delete that keeps its history, undone by Thing.restore. Verb page.

TypeScript
interface SettingVerbs {
  delete(input: SettingDeleteInput, options?: SB.CallOptions): SB.Call<Setting>
}

Emits Setting.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Setting.

Returns

OutputTypeRequiredDescription
settingSettingrequiredThe Setting.

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 setting = await $.Setting.delete({ id: 'setting_mfZPXxFQYD' })