Skip to content

Persona methods: update, delete

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

Reference for Persona, one group of Persona methods.

Persona.update

Changes the given properties of a Persona. Verb page.

TypeScript
interface PersonaVerbs {
  update(input: PersonaUpdateInput, options?: SB.CallOptions): SB.Call<Persona>
}

Emits Persona.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Persona.
jobtextWhat they come to get done.
fromstringLineage: the slot it compiles from, as Hypothesis#<slot>@v<version>.

Returns

OutputTypeRequiredDescription
personaPersonarequiredThe Persona.

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 persona = await $.Persona.update({ id: 'persona_YdpO6wSexq', from: 'Hypothesis#approach@v1' })

Persona.delete

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

TypeScript
interface PersonaVerbs {
  delete(input: PersonaDeleteInput, options?: SB.CallOptions): SB.Call<Persona>
}

Emits Persona.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Persona.

Returns

OutputTypeRequiredDescription
personaPersonarequiredThe Persona.

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 persona = await $.Persona.delete({ id: 'persona_YdpO6wSexq' })