AuthorizationSnapshotDto — @gj-kit/expo-workouts
@gj-kit/expo-workouts에서 공개하는 interface입니다. package version 0.1.1의 release declaration을 그대로 표시합니다.
검증된 import 예제
섹션 제목: “검증된 import 예제”import { AuthorizationSnapshotDto } from '@gj-kit/expo-workouts';시그니처, 매개변수, 반환 타입
섹션 제목: “시그니처, 매개변수, 반환 타입”/** * 인가 스냅샷. **판정은 하지 않는다** — 원시 사실만 넘긴다. * iOS: `authorizationStatus`(공유) + `statusForAuthorizationRequest`(시트 여부). * Android: `getGrantedPermissions()` + `processImportance()` + `declaredPermissions()`. */interface AuthorizationSnapshotDto { readonly platform: WorkoutsPlatform; readonly availability: AvailabilityDto; /** Android: granted permission strings. iOS: share-authorized HK type identifiers. */ readonly granted: readonly string[]; /** * iOS only, and the reason `write.*` can say `'denied'` rather than a permanent `'undetermined'`: * `HKHealthStore.authorizationStatus(for:)` per DECLARED type identifier, already reduced to our * vocabulary (`sharingAuthorized` -> `'granted'`, `sharingDenied` -> `'denied'`, * `notDetermined` -> `'undetermined'`). It is a SHARE-side fact only — HealthKit never reports a * read status, which is exactly why every iOS read scope is permanently `'unknown'`. * `null` on Android, where the direction is encoded in the permission string and `granted` is * already the whole truth. */ readonly statuses?: Readonly<Record<string, 'granted' | 'denied' | 'undetermined'>> | null | undefined; /** Manifest / Info.plist 선언 집합. 선언되지 않은 scope 요청은 `invalidArgument`가 된다. */ readonly declared: readonly string[]; /** iOS only: a sheet would still appear for at least one requested type. */ readonly wouldPrompt: boolean; /** Android only: the process is at IMPORTANCE_FOREGROUND (a hard precondition for foreign routes). */ readonly foreground: boolean; /** AOSP `getExerciseRouteReadAccessType`, already reduced to our vocabulary. iOS: always `'all'`. */ readonly routeAccess: RouteAccess; /** Android READ_HEALTH_DATA_HISTORY. `null` on iOS — that platform has no wall. */ readonly history: boolean | null;}이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.
Release context
섹션 제목: “Release context”- 패키지:
@gj-kit/expo-workouts - 버전:
0.1.1 - 공개 entry:
. - 소스: GitHub
구현 주석
섹션 제목: “구현 주석”인가 스냅샷. 판정은 하지 않는다 — 원시 사실만 넘긴다.
iOS: authorizationStatus(공유) + statusForAuthorizationRequest(시트 여부).
Android: getGrantedPermissions() + processImportance() + declaredPermissions().