WorkoutDto — @gj-kit/expo-workouts
@gj-kit/expo-workouts에서 공개하는 interface입니다. package version 0.1.1의 release declaration을 그대로 표시합니다.
검증된 import 예제
섹션 제목: “검증된 import 예제”import { WorkoutDto } from '@gj-kit/expo-workouts';시그니처, 매개변수, 반환 타입
섹션 제목: “시그니처, 매개변수, 반환 타입”/** * 한 워크아웃의 평면 DTO. * * ⚠ `kind`가 없다 — **활동 매핑은 `./core`가 한다.** 네이티브는 raw 정수(`activityTypeRaw`)만 * 보내고 `activity.ts`가 `WorkoutKind`로 접는다. 그래야 매핑표가 Node에서 fuzz된다. * ⚠ `indoor`도 마찬가지로 iOS에서만 채워진다(메타데이터 사다리의 결과). Android는 `null`이고 * `./core`가 `exerciseType`에서 파생한다. */interface WorkoutDto { readonly platform: WorkoutsPlatform; readonly id: string; readonly clientId?: string | null | undefined; readonly isOwn: boolean; /** HKWorkoutActivityType (iOS) / ExerciseSessionRecord.exerciseType (Android). */ readonly activityTypeRaw: number; /** iOS only. Android sends `null` — `./core` derives it from `activityTypeRaw`. */ readonly indoor?: boolean | null | undefined; readonly startMs: number; readonly endMs: number; readonly activeDurationS: number; readonly utcOffsetMin?: number | null | undefined; readonly source: SourceDto; readonly distanceM?: number | null | undefined; readonly distanceProvenance?: MetricProvenance | null | undefined; readonly activeEnergyKcal?: number | null | undefined; readonly activeEnergyProvenance?: MetricProvenance | null | undefined; readonly elevationGainM?: number | null | undefined; readonly heartRate?: HeartRateSummaryDto | null | undefined; readonly steps?: number | null | undefined; readonly pauses: readonly PauseDto[]; readonly laps: readonly LapDto[]; readonly routeState: RouteState; readonly lastModifiedMs?: number | null | undefined; /** Exactly one of these is present, matching `platform`. */ readonly ios?: IosWorkoutData | null | undefined; readonly android?: AndroidWorkoutData | null | undefined;}이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.
Release context
섹션 제목: “Release context”- 패키지:
@gj-kit/expo-workouts - 버전:
0.1.1 - 공개 entry:
. - 소스: GitHub
구현 주석
섹션 제목: “구현 주석”한 워크아웃의 평면 DTO.
⚠ kind가 없다 — 활동 매핑은 ./core가 한다. 네이티브는 raw 정수(activityTypeRaw)만
보내고 activity.ts가 WorkoutKind로 접는다. 그래야 매핑표가 Node에서 fuzz된다.
⚠ indoor도 마찬가지로 iOS에서만 채워진다(메타데이터 사다리의 결과). Android는 null이고
./core가 exerciseType에서 파생한다.