콘텐츠로 이동

GjKitWorkoutsPluginProps — @gj-kit/expo-workouts

@gj-kit/expo-workouts/plugin에서 공개하는 interface입니다. package version 0.1.1의 release declaration을 그대로 표시합니다.

import { GjKitWorkoutsPluginProps } from '@gj-kit/expo-workouts/plugin';
interface GjKitWorkoutsPluginProps {
/**
* The scopes this app will ever ask for. Drives the iOS entitlement and every Android
* `<uses-permission>` line. `'routes'` in either list additionally emits the manifest-only
* READ_EXERCISE_ROUTES entry, which is MANDATORY: undeclared, route requests silently return
* nothing with no error at all.
*
* ⚠ Since owner decision ② the vocabulary is SEVEN scopes and `'workouts'` means the session
* ALONE. `read: ['workouts']` in `app.json` now emits ONE `<uses-permission>` line instead of
* four, and the failure shows up at runtime as `undefined` totals — far from the file that
* caused it. For the old (coarse) behaviour write the four members out, or import
* `WORKOUT_TOTALS_SCOPES` from `@gj-kit/expo-workouts/core` in an `app.config.ts`.
* `./core` has zero peers, so importing it from a config file is safe.
*/
readonly read?: readonly Scope[] | undefined;
readonly write?: readonly Scope[] | undefined;
/** D10. Adds READ_HEALTH_DATA_HISTORY. Default false — the 30-day wall is the default reality. */
readonly history?: boolean | undefined;
/**
* REQUIRED. Android 14+ launches `VIEW_PERMISSION_USAGE` + category `HEALTH_PERMISSIONS` at the
* app when the user taps "privacy policy" in the permission dialog, and the activity-alias this
* plugin registers needs somewhere to go. A dead link there is a user-visible defect, and Play's
* Health apps declaration requires a policy URL anyway — so this is not optional.
*/
readonly privacyPolicyUrl: string;
readonly ios?: {
/**
* NSHealthShareUsageDescription. An English default is supplied; localise via
* `ios.infoPlist`/locales.
* ⚠ A missing usage string CRASHES at `requestAuthorization` — the plugin makes that
* unreachable.
*/
readonly shareUsageDescription?: string | undefined;
/** NSHealthUpdateUsageDescription. */
readonly updateUsageDescription?: string | undefined;
} | undefined;
}

이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.

  • 패키지: @gj-kit/expo-workouts
  • 버전: 0.1.1
  • 공개 entry: ./plugin
  • 소스: GitHub