TemplateSelectPropertyBuilder
Configures a single-select Property of a Template, including its options and index.
TemplatePropertiesBuilder.addProperty
Extends
Section titled “Extends”BaseBuilder.SelectPropertyBuilder.TemplatePropertyBase
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”SelectPropertyBuilder.isArchived
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.
Inherited from
Section titled “Inherited from”
readonlyprn:string
Platform Resource Name of the declared resource, derived from the App key and resource 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', {});Inherited from
Section titled “Inherited from”SelectPropertyBuilder.addOption
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”SelectPropertyBuilder.annotate
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”index()
Section titled “index()”index():
this
Marks the Property as indexed so selectors can filter and sort on it.
Returns
Section titled “Returns”this
This builder for chaining.
Throws
Section titled “Throws”When the Property is already indexed.
Inherited from
Section titled “Inherited from”TemplatePropertyBase.index
setDescription()
Section titled “setDescription()”setDescription(
description):this
Sets the description emitted into the definition and rendered in generated reference and application assets.
Parameters
Section titled “Parameters”description
Section titled “description”string
Human-readable description of the resource.
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”SelectPropertyBuilder.setLabel
toDefinition()
Section titled “toDefinition()”toDefinition():
PropertyDefinition
Emits the Definition of this Property.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”SelectPropertyBuilder.toDefinition
unarchive()
Section titled “unarchive()”unarchive():
this
Reverses PropertyBuilder.archive.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”SelectPropertyBuilder.unarchive
unique()
Section titled “unique()”unique():
this
Marks the Property as a unique index: no two Items of the Template in a Workspace share a value.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”TemplatePropertyBase.unique

