Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
data class ApplyResult(val state: <Error class: unknown class>, val events: List<EmittedEvent> = emptyList(), val error: ActionError? = null)
What one interaction produced.
Link copied to clipboard
data class EmittedEvent(val name: String, val params: <Error class: unknown class> = JsonObject(emptyMap()))
An event an interaction produced, in the order it was reached.
Link copied to clipboard
class JoyStore(view: <Error class: unknown class>, initialState: <Error class: unknown class> = JsonObject(emptyMap()), resolver: <Error class: unknown class> = Resolver.Default, onEvent: (EmittedEvent) -> Unit? = null, onError: (LoggedEvent, ActionError) -> Unit? = null)
The one state owner: holds the state and the session log, and runs dispatch → apply → resolve serially.
Link copied to clipboard
data class LoggedEvent(val binding: Action.Emit, val payload: <Error class: unknown class> = JsonNull)
One interaction as it was fired — enough to replay it.
Link copied to clipboard
A write against state: a verb, an RFC 6901 path, and whatever the verb needs.
Functions
Link copied to clipboard
fun applyAction(state: <Error class: unknown class>, action: Action, payload: <Error class: unknown class> = JsonNull): ApplyResult
Link copied to clipboard
fun dispatchEvent(state: <Error class: unknown class>, binding: Action.Emit, handlers: Map<String, Action>, payload: <Error class: unknown class> = JsonNull): ApplyResult
Resolves a fired binding against the document's handlers region and runs one interaction.
Link copied to clipboard
The document's handlers region: event name → Action.