EventRepository

internal interface EventRepository

Inheritors

Functions

Link copied to clipboard
abstract suspend fun acknowledgeMissedEvent(): Either<CoreFailure, Unit>

Performs an acknowledgment of the missed event after performing a slow sync.

Link copied to clipboard
abstract suspend fun clearLastSavedEventId(): Either<StorageFailure, Unit>

Clears the last saved event ID.

Link copied to clipboard
abstract suspend fun fetchMostRecentEventId(): Either<CoreFailure, String>
Link copied to clipboard
abstract suspend fun fetchOldestAvailableEventId(): Either<CoreFailure, String>

Fetches the oldest available event ID from remote.

Link copied to clipboard
abstract suspend fun lastSavedEventId(): Either<StorageFailure, String>

Retrieves the last saved event ID from the storage.

Link copied to clipboard
abstract suspend fun liveEvents(): Either<CoreFailure, Flow<IncrementalSyncPhase>>
Link copied to clipboard
abstract fun observeEvents(): Flow<List<EventEnvelope>>
Link copied to clipboard
abstract fun parseExternalEvents(data: String): List<EventEnvelope>

Parse events from an external JSON payload

Link copied to clipboard
abstract suspend fun setEventAsProcessed(eventId: String): Either<StorageFailure, Unit>
Link copied to clipboard
abstract suspend fun setEventsAsProcessed(eventIds: List<String>): Either<StorageFailure, Unit>
Link copied to clipboard
abstract fun setUnprocessedEventsBatchLimit(limit: Int?)
Link copied to clipboard
abstract suspend fun updateLastSavedEventId(eventId: String): Either<StorageFailure, Unit>

Updates the last saved event ID.