UpdateTilesEventSchema

@Serializable
@SerialName(value = "UpdateTiles")
data class UpdateTilesEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val updates: SerializableImmutableList<UpdateTilesEventSchema.Update>) : EventSchema

Patches tiles in place, the primary way to change what is on screen without refetching it.

Each Update targets a tile by Update.tileId and merges a map of field names into it — only the listed fields change, and style is merged rather than replaced. The map comes from Update.updateData:

  • Incoming — the event's incomingData, used as-is when it is a map. An update whose incomingData is not a map is skipped and counts as a failure.

  • Inline — a literal map declared on the event.

  • Mapped — one template per field, each applied to incomingData through the client's TemplateProcessor, so a payload can be reshaped per field on the way in.

All updates are attempted; a failure in one does not stop the others.

incomingData consumed: used by Incoming and Mapped updates.

Triggers fired:

  • OnSuccessEventTrigger — when every update was applied. No data is passed downstream.

  • OnFailureEventTrigger — when at least one update failed: no tile carries that id, a Mapped template threw, or an Incoming update got non-map incomingData. Fired once at the end, after all updates were attempted, with no data attached; each failure is logged.

Constructors

Types

Link copied to clipboard
@Serializable
data class Update(val tileId: String, val updateData: UpdateTilesEventSchema.Update.UpdateData)

Properties

Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.

Link copied to clipboard