SubmitOutbox

interface SubmitOutbox<T : Any>

Inheritors

Functions

Link copied to clipboard
abstract suspend fun clear(formKey: String)

Remove all drafts for formKey.

Link copied to clipboard
abstract fun drafts(formKey: String): Flow<List<DraftEntry<T>>>

All drafts for formKey, ordered newest-first.

Link copied to clipboard
abstract suspend fun enqueue(formKey: String, uniqueKey: String, payload: T)

Idempotent upsert by (formKey, uniqueKey). Resets to PENDING if not yet SUBMITTED.

Link copied to clipboard
abstract suspend fun markFailed(formKey: String, uniqueKey: String, error: String)

Mark FAILED with an error message; caller may retry later.

Link copied to clipboard
abstract suspend fun markSubmitted(formKey: String, uniqueKey: String)

Mark SUBMITTED after a successful sync.