Package-level declarations

Types

Link copied to clipboard

Intermediate value produced by Data.valueAtKey: an operation called on it (mirroring the Data operations above) validates the map entry at that key instead of the map as a whole.

Functions

Link copied to clipboard
Link copied to clipboard
fun EventSchemaBuilderScope.CheckForReceivedData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, dataKey: String)

Reads a one-shot value from the client's DataMailer under dataKey and branches on whether it was there — the receiving half of a SendData/CheckForReceivedData handoff between screens. Does not consume incomingData. Dispatches onDataReceived and onSuccess (both carrying the value) when a value exists for dataKey; onFailure (no data) when none does.

Link copied to clipboard
Link copied to clipboard

References a value read from dataSource via accessMode as the value an operation is applied to.

Link copied to clipboard

Evaluates the boolean expression and branches on the result, on the IO dispatcher. An expression composes not/and/or over leaf comparisons built by calling an operation function (e.g. isEqualsTo, isNull, containsSubstring) on a incomingData/dataSourceData value; an operation applied to a value of the wrong runtime type evaluates to false rather than throwing. Forwards incomingData unchanged to whichever trigger fires; any IncomingData leaf reads from that same value. Dispatches onSuccess (forwarding incomingData) when expression evaluates to true; onFailure (also forwarding incomingData) when it evaluates to false, or with the thrown Throwable instead when evaluation itself throws.

Link copied to clipboard

Writes incomingData as-is under the single, exact key dataId — no key explosion, so this is required whenever incomingData is itself a map/record.

Link copied to clipboard

Writes null under the single, exact key dataId — clears the entry on in-memory data holders; skipped on databases.

Link copied to clipboard

Writes value as-is under the single, exact key dataId — no key explosion, so this is required whenever the value is itself a map/record.

Link copied to clipboard
fun EventSchemaBuilderScope.GetData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, readings: GetDataReadingBuilderScope.() -> Unit)

Reads one or more values from data sources and emits them downstream, on the IO dispatcher. Each readings entry (built with reading) pairs a data source with an access mode; readings are processed in order into a single accumulator, so a later reading overwrites an earlier one on key collision. Full access mode, and Batch without unwrapValuesToList, produce a map keyed by data id; Batch with unwrapValuesToList produces a list of values; with only Single readings, one reading emits the bare value and several emit a list — a map result wins over a list result when the two are mixed. Does not consume incomingData. Dispatches onStart before any reading runs, onSuccess (carrying the assembled result) once every reading resolves, and onFailure on the first problem — a Single id resolving to null, a missing Batch id with allowMissingData false, or a database read failure.

Link copied to clipboard

References the event's own incomingData as the value an operation is applied to.

Link copied to clipboard

Spreads incomingData's own keys into the write, when it is a map. Contributes nothing when it isn't.

Link copied to clipboard

Writes a literal set of key-value pairs, exploding each key into its own data id.

Writes a literal map of key-value pairs, exploding each key into its own data id.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

True when this string value is not empty and not made only of whitespace.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Negates expressiontrue becomes false and vice versa.

Link copied to clipboard

Combines this expression with otherExpression — at least one must be true.

Link copied to clipboard
fun EventSchemaBuilderScope.ProcessData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, processWith: String)

Hands incomingData to the DataProcessor the host client app registered under processWith — what the processing does is opaque to the framework, since processors are supplied by the client. incomingData is required; the processor's own result is not passed downstream. Dispatches onSuccess (no data) when the processor returns successfully; onFailure when the processor returns a failure (carrying the Throwable), when no processor is registered under processWith, or when incomingData is null (no data in the latter two cases).

Link copied to clipboard
fun EventSchemaBuilderScope.RemoveData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, deletions: DeleteDataDeletionBuilderScope.() -> Unit)

Deletes values from data sources, on the IO dispatcher. Each deletions entry (built with addDeletion) pairs a data source with an access mode — Single removes one id, Batch removes a list of ids, Full wipes the source. Supports the application and screen data holders (plain and segmented) and the plain and segmented local databases; deletions targeting navigation data, a tile or an inline source are silently ignored. All deletions are attempted even if one fails. Does not consume incomingData. Dispatches onSuccess (no data) when every deletion completes without error; onFailure (no data), once at the end, when at least one database deletion failed.

Link copied to clipboard
fun EventSchemaBuilderScope.SendData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, dataKey: String, data: AnySerializable? = null)

Posts a value into the client's DataMailer under dataKey, where a later CheckForReceivedData can pick it up — the mailer is a one-shot channel, so this is how a value is handed off to another screen. Sends data when it is non-null, otherwise incomingData. Dispatches onSuccess (no data) after the value is posted; onFailure (no data, error logged) when both data and incomingData are null, so there is nothing to send.

Link copied to clipboard
fun EventSchemaBuilderScope.TransformData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, template: AnySerializable)

Reshapes incomingData into a new value by applying template through the client's TemplateProcessor, letting a payload be rewritten mid-chain without a round trip. template placeholders follow <|path.to.key|> (dot-notation into incomingData) and <||> (the whole incomingData, type preserved); a template mixing a placeholder with literal text is coerced to a string, while a single bare placeholder keeps its native type. incomingData is required as the input the template is applied to. Dispatches onSuccess (carrying the transformed value) when the template applies cleanly; onFailure (carrying the thrown Throwable, error logged) when applying it throws.

fun EventSchemaBuilderScope.TransformData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, eventTemplate: EventSchemaBuilderScope.() -> Unit = {})

Overload of TransformData that builds the template as a nested tile-event-style block (eventTemplate) rather than a literal value — useful when the template itself needs to be assembled from Kotlin data structures via the event DSL. Behaves otherwise exactly like the literal-template overload.

Link copied to clipboard
fun EventSchemaBuilderScope.UpdateData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, updates: UpdateDataUpdateBuilderScope.() -> Unit)

Writes values into data sources, on the IO dispatcher. Updates are grouped by data source, and each updates entry (built with update) resolves to a set of key/value entries: incoming data (built with incomingUpdateData) spreads incomingData when it is a map (and contributes nothing when it isn't), inline data (built with inlineUpdateData) writes a literal map, and explicit data (built with explicitUpdateData/explicitIncomingUpdateData/explicitNullUpdateData) writes a single known key taking its value from a literal or from incomingData as-is — the only way to write a value that is itself a map/record intact. Supports the application and screen data holders (plain and segmented) and the plain and segmented local databases; updates targeting navigation data, a tile or an inline source are silently ignored. The in-memory data holders accept null (clearing the entry); the databases don't yet, so entries resolving to null are skipped instead of written. Dispatches onSuccess (no data) when every write completes without error; onFailure (no data, each failure logged), once at the end, when at least one database write failed.

Link copied to clipboard

Focuses this map value's entry at key, so an operation (isEqualsTo, isSmallerThan, etc) chained on it validates that entry's value instead of the map itself.