Skip to content

Component methods: update, delete

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

Reference for Component, one group of Component methods.

Component.update

Changes the given properties of a Component. Verb page.

TypeScript
interface ComponentVerbs {
  update(input: ComponentUpdateInput, options?: SB.CallOptions): SB.Call<Component>
}

Emits Component.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Component.
namestringThe name a Template places it by, such as Pricing.
propsjsonThe schema of the props it accepts.
regionstringWhere it sits: header, section, footer, or notice.
interactivebooleanTrue when it runs code in the browser; it still renders a static still without it.

Returns

OutputTypeRequiredDescription
componentComponentrequiredThe Component.

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 component = await $.Component.update({ id: 'component_1qALyfTlfx', name: 'Leaseline' })

Component.delete

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

TypeScript
interface ComponentVerbs {
  delete(input: ComponentDeleteInput, options?: SB.CallOptions): SB.Call<Component>
}

Emits Component.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Component.

Returns

OutputTypeRequiredDescription
componentComponentrequiredThe Component.

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 component = await $.Component.delete({ id: 'component_1qALyfTlfx' })