Widget

@Serializable
data class Widget(val capabilityId: String, val type: String? = null, val status: String, val currentVersion: Int = 0, val heading: String? = null, val errorMessage: String? = null, val data: JsonObject? = null)

One capability's output within an experience.

Constructors

Link copied to clipboard
constructor(capabilityId: String, type: String? = null, status: String, currentVersion: Int = 0, heading: String? = null, errorMessage: String? = null, data: JsonObject? = null)

Properties

Link copied to clipboard

Identifies this capability instance for refinement.

Link copied to clipboard

Increments on each refinement; pass as expectedVersion to refine.

Link copied to clipboard
val data: JsonObject? = null

The capability's payload, left as raw JSON.

Link copied to clipboard
val errorMessage: String? = null

Why this widget failed, when status is ERROR.

Link copied to clipboard
val heading: String? = null

Display heading, when the capability produced one.

Link copied to clipboard

Per-widget state: PENDING, COMPLETED, or ERROR.

Link copied to clipboard
val type: String? = null

Widget type, e.g. catalog_recommendations.