ScreenResponse

@Serializable
data class ScreenResponse(val id: String, val tiles: SerializableImmutableList<TileSchema>, val navigationDrawerTiles: SerializableImmutableList<TileSchema>?, val events: SerializableImmutableList<EventSchema>?, val ttl: String? = null)

The raw wire shape of a screen fetch response, decoded directly from the backend's JSON — what mosaic-server's Screen { } builder produces. Converted to a dev.catbit.mosaic.core.data.models.screen.ScreenModel via ScreenModel.fromScreenResponse before the client installs it; that conversion is also where id/ttl are consumed and dropped — dev.catbit.mosaic.core.data.models.screen.ScreenModel carries neither field, since by the time a screen is being installed its id is already known (it's the screen currently being loaded) and its cache freshness has already been decided by the repository layer.

Constructors

Link copied to clipboard
constructor(id: String, tiles: SerializableImmutableList<TileSchema>, navigationDrawerTiles: SerializableImmutableList<TileSchema>?, events: SerializableImmutableList<EventSchema>?, ttl: String? = null)

Properties

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

screen-level events (e.g. ones triggered by onDisplay() at the screen level, not scoped to a single tile).

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

id of the screen this response is for.

Link copied to clipboard
@SerialName(value = "navigationDrawerTiles")
val navigationDrawerTiles: SerializableImmutableList<TileSchema>?

content rendered inside the screen's ModalNavigationDrawer, if any.

Link copied to clipboard
@SerialName(value = "tiles")
val tiles: SerializableImmutableList<TileSchema>

the screen's tile tree.

Link copied to clipboard
@SerialName(value = "ttl")
val ttl: String?

how long this response may be served from cache before a fresh fetch is attempted — an ISO date-time string, parsed and consumed only at the repository layer.