MentalFitness

interface MentalFitness

Mental Fitness feature — support exercises for building resilience and coping strategies.

This interface provides operations for the Spot It technique:

  • Fetching technique data (situations, symptoms, endorsements, successes).

  • Generating "spots" (coping mechanisms) based on user input.

  • Submitting feedback for a completed Spot It session.

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

Functions

Link copied to clipboard
abstract suspend fun generateSpots(situationIds: List<Long>, symptomIds: List<Long>, timestampInSeconds: Long): SpotItResult

Generates a list of "spots" (coping mechanisms) for the Spot It technique.

Link copied to clipboard
abstract suspend fun getSpotItTechniqueData(): SpotItData

Retrieves data required for the Spot It technique.

Link copied to clipboard
abstract suspend fun submitSpotItFeedback(spotId: String, endorsementId: Int, successId: Int, feedback: String?): AFResult

Submits feedback for a Spot It session.