Skip to content

Thread methods: update, delete

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

Reference for Thread, one group of Thread methods.

Thread.update

Changes the given properties of a Thread. Verb page.

TypeScript
interface ThreadVerbs {
  update(input: ThreadUpdateInput, options?: SB.CallOptions): SB.Call<Thread>
}

Emits Thread.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Thread.
subjectstringWhat the Thread is about.

Returns

OutputTypeRequiredDescription
threadThreadrequiredThe Thread.

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 thread = await $.Thread.update({ id: 'thread_GzIHRhK100', subject: 'Example subject' })

Thread.delete

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

TypeScript
interface ThreadVerbs {
  delete(input: ThreadDeleteInput, options?: SB.CallOptions): SB.Call<Thread>
}

Emits Thread.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Thread.

Returns

OutputTypeRequiredDescription
threadThreadrequiredThe Thread.

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 thread = await $.Thread.delete({ id: 'thread_GzIHRhK100' })