Skip to content

RouteAccess — @gj-kit/expo-workouts

A public type from @gj-kit/expo-workouts/core. The signature below is taken directly from the 0.1.1 release declaration.

import { RouteAccess } from '@gj-kit/expo-workouts/core';
/**
* How far route reads reach right now.
* - 'all' — the route permission is held AND the app is in the foreground.
* - 'own' — only routes this app wrote read inline.
* - 'perRoute' — nothing reads inline; each route needs `getRoute(id, { consent: 'prompt' })`.
*
* ⚠ On iOS this is always `'all'` and is NOT evidence of anything — read it together with
* `read.routes === 'unknown'`.
* ⚠ On Android `'all'` does NOT guarantee a route read succeeds: Health Connect's first-run
* onboarding is an undocumented further precondition. `'all'` + `getRoute` throwing
* `consentRequired` is the signature of incomplete onboarding — send the user to `openSettings()`.
* CLOSED for 1.x.
*/
type RouteAccess = 'all' | 'own' | 'perRoute';

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-workouts
  • Version: 0.1.1
  • Public entry: ./core
  • Source: GitHub