Skip to content

Play methods: update, delete

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

Reference for Play, one group of Play methods.

Play.update

Changes the given properties of a Play. Verb page.

TypeScript
interface PlayVerbs {
  update(input: PlayUpdateInput, options?: SB.CallOptions): SB.Call<Play>
}

Emits Play.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Play.
familystringThe job it does, such as demand, retention, or pricing.
costmoneyWhat one run costs.
cohortjsonThe Portfolio query a Studio rolls it out to.
fromstringLineage: the slot it compiles from, as Hypothesis#<slot>@v<version>.

Returns

OutputTypeRequiredDescription
playPlayrequiredThe Play.

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 play = await $.Play.update({ id: 'play_hr4WTcrAyZ', family: 'demand' })

Play.delete

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

TypeScript
interface PlayVerbs {
  delete(input: PlayDeleteInput, options?: SB.CallOptions): SB.Call<Play>
}

Emits Play.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Play.

Returns

OutputTypeRequiredDescription
playPlayrequiredThe Play.

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 play = await $.Play.delete({ id: 'play_hr4WTcrAyZ' })