Skip to content

ICP methods: update, delete

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

Reference for ICP, one group of ICP methods.

ICP.update

Changes the given properties of an ICP. Verb page.

TypeScript
interface ICPVerbs {
  update(input: ICPUpdateInput, options?: SB.CallOptions): SB.Call<ICP>
}

Emits ICP.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the ICP.
descriptiontextWho they are and what they do.

Returns

OutputTypeRequiredDescription
icpICPrequiredThe ICP.

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 icp = await $.ICP.update({ id: 'icp_EwhsJU4AOW', description: 'Renewal tracking for up to 200 units.' })

ICP.delete

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

TypeScript
interface ICPVerbs {
  delete(input: ICPDeleteInput, options?: SB.CallOptions): SB.Call<ICP>
}

Emits ICP.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the ICP.

Returns

OutputTypeRequiredDescription
icpICPrequiredThe ICP.

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 icp = await $.ICP.delete({ id: 'icp_EwhsJU4AOW' })