Skip to content

Comment methods: update, delete

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

Reference for Comment, one group of Comment methods.

Comment.update

Changes the given properties of a Comment. Verb page.

TypeScript
interface CommentVerbs {
  update(input: CommentUpdateInput, options?: SB.CallOptions): SB.Call<Comment>
}

Emits Comment.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Comment.
bodytextWhat it says.

Returns

OutputTypeRequiredDescription
commentCommentrequiredThe Comment.

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 comment = await $.Comment.update({ id: 'comment_MUIgpgdysq', body: 'Example body' })

Comment.delete

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

TypeScript
interface CommentVerbs {
  delete(input: CommentDeleteInput, options?: SB.CallOptions): SB.Call<Comment>
}

Emits Comment.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Comment.

Returns

OutputTypeRequiredDescription
commentCommentrequiredThe Comment.

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 comment = await $.Comment.delete({ id: 'comment_MUIgpgdysq' })