Skip to content

Keyword methods: update, delete

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

Reference for Keyword, one group of Keyword methods.

Keyword.update

Changes the given properties of a Keyword. Verb page.

TypeScript
interface KeywordVerbs {
  update(input: KeywordUpdateInput, options?: SB.CallOptions): SB.Call<Keyword>
}

Emits Keyword.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Keyword.
phrasestringThe words searched or asked.
formstringOne of search or question.

Returns

OutputTypeRequiredDescription
keywordKeywordrequiredThe Keyword.

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 keyword = await $.Keyword.update({ id: 'keyword_cEoeFM4Drs', form: 'search' })

Keyword.delete

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

TypeScript
interface KeywordVerbs {
  delete(input: KeywordDeleteInput, options?: SB.CallOptions): SB.Call<Keyword>
}

Emits Keyword.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Keyword.

Returns

OutputTypeRequiredDescription
keywordKeywordrequiredThe Keyword.

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 keyword = await $.Keyword.delete({ id: 'keyword_cEoeFM4Drs' })