GraphResponse

@Serializable
data class GraphResponse(val entries: SerializableImmutableList<GraphResponse.Entry>, val startEntryId: String, val ttl: String? = null, val defaultTransition: ContentTransitionSchema? = null, val defaultPopTransition: ContentTransitionSchema? = null, val defaultPredictivePopTransition: ContentTransitionSchema? = null)

The raw wire shape of a Graph/navigation-graph fetch response, decoded directly from the backend's JSON — what mosaic-server's Graph { } builder produces. Converted to a dev.catbit.mosaic.core.data.models.graph.GraphModel via GraphModel.fromGraphResponse before the client uses it further; that conversion is also where ttl is consumed (by the repository layer, to decide cache freshness) and dropped — dev.catbit.mosaic.core.data.models.graph.GraphModel itself carries no ttl field.

Constructors

Link copied to clipboard
constructor(entries: SerializableImmutableList<GraphResponse.Entry>, startEntryId: String, ttl: String? = null, defaultTransition: ContentTransitionSchema? = null, defaultPopTransition: ContentTransitionSchema? = null, defaultPredictivePopTransition: ContentTransitionSchema? = null)

Types

Link copied to clipboard
@Serializable
data class Entry(val screenId: String, val initialTiles: SerializableImmutableList<TileSchema>, val initialEvents: SerializableImmutableList<EventSchema>, val failureTiles: SerializableImmutableList<TileSchema>, val failureEvents: SerializableImmutableList<EventSchema>, val transition: ContentTransitionSchema? = null, val popTransition: ContentTransitionSchema? = null, val predictivePopTransition: ContentTransitionSchema? = null)

One registered screen within the graph — the wire shape of a server DSL entry { } block.

Properties

Link copied to clipboard
@SerialName(value = "defaultPopTransition")
val defaultPopTransition: ContentTransitionSchema?

fallback transition for popping the back stack.

Link copied to clipboard
@SerialName(value = "defaultPredictivePopTransition")
val defaultPredictivePopTransition: ContentTransitionSchema?

fallback transition for the predictive back gesture.

Link copied to clipboard
@SerialName(value = "defaultTransition")
val defaultTransition: ContentTransitionSchema?

fallback enter/exit transition for any entry that doesn't declare its own.

Link copied to clipboard
@SerialName(value = "entries")
val entries: SerializableImmutableList<GraphResponse.Entry>

every screen registered in this graph, each with its own loading/failure content and transitions.

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

id of the entry the graph opens on.

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.