Package-level declarations

Types

Link copied to clipboard
data class DraftEntry<T>(val formKey: String, val uniqueKey: String, val payload: T, val status: DraftStatus, val errorMessage: String?, val createdAt: Long, val updatedAt: Long)
Link copied to clipboard
Link copied to clipboard
data class OpEntry(val id: String, val type: String, val payload: String, val attempts: Int, val status: OpStatus, val lastError: String?, val createdAtMs: Long)

One logged operation. id is the idempotency key; attempts counts transient failures so far.

Link copied to clipboard
interface OpOutbox

The SECOND outbox shape: a durable, FIFO, append-only operation log — distinct from SubmitOutbox, which is a keyed latest-write-wins draft store. Reach for this one when order matters and every mutation must reach the server exactly once, surviving process death:

Link copied to clipboard
interface OpOutboxDao
Link copied to clipboard
data class OpOutboxEntity(val seq: Long = 0, val id: String, val type: String, val payload: String, val attempts: Int, val status: String, val lastError: String?, val createdAtMs: Long)
Link copied to clipboard
Link copied to clipboard
abstract class OutboxDatabase : RoomDatabase
Link copied to clipboard
Link copied to clipboard

Room-backed OpOutbox. The replay semantics (dead-letter on permanent/exhausted, stop-on-transient to preserve order) live here; the DAO only moves rows. Payload is an opaque string — the caller serializes before enqueue and deserializes inside its send, so this stays transport-agnostic.

Link copied to clipboard
class RoomSubmitOutbox<T : Any>(dao: SubmitDraftDao, json: Json, serializer: KSerializer<T>) : SubmitOutbox<T>
Link copied to clipboard
interface SubmitDraftDao
Link copied to clipboard
data class SubmitDraftEntity(val formKey: String, val uniqueKey: String, val payloadJson: String, val status: String, val errorMessage: String?, val createdAt: Long, val updatedAt: Long)
Link copied to clipboard
interface SubmitOutbox<T : Any>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
actual fun epochMillis(): Long
actual fun epochMillis(): Long
actual fun epochMillis(): Long