PendingVisit

class PendingVisit(val id: String, val visitType: VisitType, val facilityId: String, val timestampSeconds: Long, val timeSpentSeconds: Long, val enqueuedAtMillis: Long)

A visit captured on this device that is still waiting in the offline outbox for delivery to the backend.

Pending visits are the gap between what the member did and what the server-backed calendar (Activities.get) already shows: an automatic visit or self-report submitted offline lives here until the outbox delivers it. UI lists typically render them above (or merged into) the confirmed activities, marked as "pending upload".

All values are the capture-time data the visit will be delivered with — never recalculated at read or flush time.

Constructors

Link copied to clipboard
constructor(id: String, visitType: VisitType, facilityId: String, timestampSeconds: Long, timeSpentSeconds: Long, enqueuedAtMillis: Long)

Properties

Link copied to clipboard

Epoch milliseconds of when the visit entered the queue. Entries older than the outbox retention window (30 days) are evicted and stop appearing.

Link copied to clipboard

The facility (location) the visit belongs to.

Link copied to clipboard
val id: String

Stable identifier of the queue entry, unique per pending visit. Suitable as a list key. Not a server id — the entry disappears once delivered.

Link copied to clipboard

Time spent at the facility, in seconds.

Link copied to clipboard

Epoch seconds of when the visit actually happened.

Link copied to clipboard

How the visit was captured: VisitType.GEOFENCING / VisitType.BEACON for automatic visits, VisitType.SELF_REPORT for self-reported ones.

Functions

Link copied to clipboard
open override fun toString(): String