Skip to content

PropertyBuilder

Configures a declared Property: its label, archive state and emitted Definition.

Properties are declared through TemplatePropertiesBuilder.addProperty; this is the common surface shared by typed, select and JSON Properties.

readonly annotations: readonly PropertyAnnotation[]

Annotations declared so far, in declaration order.


readonly isArchived: boolean

Whether the Property is archived and therefore hidden from new use while its data is kept.


readonly key: string

Property key within its Template.


readonly label: string

Display label, which defaults to the key.


readonly prn: string

Platform Resource Name of the Property, derived from its Template and key.


readonly type: PropertyDefinitionType

Declared data type, or json for a Property parsed by a Zod type.

annotate(…annotations): this

Adds annotations to the Property, in declaration order; may be called more than once.

…PropertyAnnotation[]

this


archive(): this

Archives the Property so it is retired without deleting stored values.

this

This builder for chaining.


setLabel(label): this

Sets the display label, truncated to 500 characters.

string

Human-readable label.

this

This builder for chaining.


toDefinition(): PropertyDefinition

Emits the Definition of this Property.

PropertyDefinition


unarchive(): this

Reverses PropertyBuilder.archive.

this

This builder for chaining.