SelectPropertyBuilder
Configures a single-select or multi-select Property and its options.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”annotations
Section titled “annotations”
readonlyannotations: readonlyPropertyAnnotation[]
Annotations declared so far, in declaration order.
Inherited from
Section titled “Inherited from”TemplateSelectPropertyBuilder.annotations
isArchived
Section titled “isArchived”
readonlyisArchived:boolean
Whether the Property is archived and therefore hidden from new use while its data is kept.
Inherited from
Section titled “Inherited from”
readonlykey:string
Property key within its Template.
Inherited from
Section titled “Inherited from”
readonlylabel:string
Display label, which defaults to the key.
Inherited from
Section titled “Inherited from”options
Section titled “options”
readonlyoptions:SelectOptionDefinition[]
Options declared so far, in declaration order.
readonlyprn:string
Platform Resource Name of the Property, derived from its Template and key.
Inherited from
Section titled “Inherited from”
readonlytype:PropertyDefinitionType
Declared data type, or json for a Property parsed by a Zod type.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addOption()
Section titled “addOption()”addOption(
key,input):this
Adds an option to the select.
Parameters
Section titled “Parameters”string
Option key, 1 to 128 characters; it is the stored value.
Display attributes; pass {} for none.
Returns
Section titled “Returns”this
This builder for chaining.
Throws
Section titled “Throws”When key is empty or longer than 128 characters, or the option limit is exceeded.
Example
Section titled “Example”Declaring the options of an installation Property
const installation = addon.addProperty('installation', 'single-select');installation.addOption('uninstalled', {});installation.addOption('requested', { label: 'Requested' });installation.addOption('installed', {});annotate()
Section titled “annotate()”annotate(…
annotations):this
Adds annotations to the Property, in declaration order; may be called more than once.
Parameters
Section titled “Parameters”annotations
Section titled “annotations”Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”archive()
Section titled “archive()”archive():
this
Archives the Property so it is retired without deleting stored values.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”setLabel()
Section titled “setLabel()”setLabel(
label):this
Sets the display label, truncated to 500 characters.
Parameters
Section titled “Parameters”string
Human-readable label.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”toDefinition()
Section titled “toDefinition()”toDefinition():
PropertyDefinition
Emits the Definition of this Property.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”unarchive()
Section titled “unarchive()”unarchive():
this
Reverses PropertyBuilder.archive.
Returns
Section titled “Returns”this
This builder for chaining.

