SelfReport

interface SelfReport

Self-Report feature — allow members to manually report facility visits.

This interface provides operations to:

  • Retrieve existing self-report data.

  • Submit new self-reported visits.

  • Delete existing reports.

Self-reporting is typically used when automatic visit tracking (e.g., via geofencing or proximity) is not available or when the member needs to manually confirm a facility visit.

Platform & threading

  • All functions are suspend and must be called from a coroutine.

  • Errors surface as Throwable and should be handled at call sites.

Typical flows

  • History: call get to load existing self-report history.

  • Submission: call submit to record a visit manually.

  • Correction: call delete if a report needs to be removed.

Functions

Link copied to clipboard
abstract suspend fun delete(date: String): AFResult

Deletes a self-report for a specific date.

Link copied to clipboard
abstract suspend fun get(): SelfReportData

Retrieves the member’s self-report data.

Link copied to clipboard
abstract suspend fun submit(facilityId: Int, timestampInSeconds: Long, timeSpentInMinutes: Int, latitude: Double? = null, longitude: Double? = null, atFacility: Boolean = false): AFResult

Submits a self-report for a facility visit.