Skip to content

Entitlement methods: update, delete

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

Reference for Entitlement, one group of Entitlement methods.

Entitlement.update

Changes the given properties of an Entitlement. Verb page.

TypeScript
interface EntitlementVerbs {
  update(input: EntitlementUpdateInput, options?: SB.CallOptions): SB.Call<Entitlement>
}

Emits Entitlement.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Entitlement.
verbVerbThe Verb it grants.
limitLimitThe Limit that bounds it.
kindstringComputed, never set: feature, or limit when a Limit bounds it.

Returns

OutputTypeRequiredDescription
entitlementEntitlementrequiredThe Entitlement.

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 entitlement = await $.Entitlement.update({ id: 'ent_7MQACmrzGj', verb: 'verb_hlkWBvrAyZ' })

Entitlement.delete

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

TypeScript
interface EntitlementVerbs {
  delete(input: EntitlementDeleteInput, options?: SB.CallOptions): SB.Call<Entitlement>
}

Emits Entitlement.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Entitlement.

Returns

OutputTypeRequiredDescription
entitlementEntitlementrequiredThe Entitlement.

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 entitlement = await $.Entitlement.delete({ id: 'ent_7MQACmrzGj' })