Skip to content

TransitionBuilder

Declares a transition between two states, its payload and who may execute it.

The payload is declared with the InputBuilder methods this interface exposes, such as addProperty. The Runtime checks the source state atomically when the transition executes.

readonly prn: string

Platform Resource Name of the declared resource, derived from the App key and resource key.

BaseBuilder.prn

addArray(key): ArrayInputBuilder

Declares an array value; declare its element type on the returned builder.

string

Input key.

ArrayInputBuilder

InputBuilder.addArray


addGrant(role): TransitionGrantBuilder

Grants a Template Role permission to execute this transition.

TemplateRoleBuilder

Template Role permitted to execute the transition.

TransitionGrantBuilder

The Grant builder.

Grant access


addJson(key, parser): JsonInputBuilder

Declares a JSON value parsed by a Zod type or parse function.

string

Input key.

ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | JsonParse<any>

Zod type or parse function that parses the value.

JsonInputBuilder

InputBuilder.addJson


addObject(key): ObjectInputBuilder

Declares a nested object value; declare its members on the returned builder.

string

Input key.

ObjectInputBuilder

InputBuilder.addObject


addProperty(key, type): DataTypeInputBuilder

Declares a primitive or temporal value such as 'id', 'string' or 'date'.

string

Input key.

PrimitiveDataType | TemporalDataType

Data type of the value.

DataTypeInputBuilder

InputBuilder.addProperty

addProperty(key, type, options?): SelectInputBuilder

Declares a single-select or multi-select value; declare its options on the returned builder, or resolve them from a well-known format via options.format.

string

Input key.

SelectDataType

Select data type.

SelectInputOptions

Select options, such as the format the options are resolved from.

SelectInputBuilder

InputBuilder.addProperty

addProperty(key, type): JsonInputBuilder

Declares a JSON value parsed by a Zod type.

string

Input key.

ZodType

Zod type of the value.

JsonInputBuilder

InputBuilder.addProperty

addProperty(key, type, options?): JsonInputBuilder

Declares a value of any supported type and returns the matching builder.

string

Input key.

PrimitiveDataType | TemporalDataType | SelectDataType | ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

Data type name or Zod type.

SelectInputOptions

Select options, only applicable to a select data type.

JsonInputBuilder

InputBuilder.addProperty


setDescription(description): this

Sets the description emitted into the definition and rendered in generated reference and application assets.

string

Human-readable description of the resource.

this

This builder for chaining.

BaseBuilder.setDescription


toDefinition(): TransitionDefinition

Emits the Definition of this transition, including its source and target states, payload and Grants.

TransitionDefinition