@kaiord/core / heartRateSeriesSchema
Variable: heartRateSeriesSchema
constheartRateSeriesSchema:ZodObject<{externalId:ZodOptional<ZodString>;intervalSeconds:ZodNumber;kaiordRecordId:ZodOptional<ZodString>;kind:ZodLiteral<"heart-rate-series">;samples:ZodArray<ZodNullable<ZodNumber>>;sourceBridgeId:ZodOptional<ZodString>;startTime:ZodISODateTime;version:ZodString; },$strip>
Defined in: packages/core/src/domain/schemas/health/heart-rate-series.ts:16
Zod schema for extensions.health.heart-rate-series — a read-only, source-agnostic, compact uniform-interval daily heart-rate trace. Unlike the six FIT-core health types it is not mandated to round-trip through FIT, and unlike a recorded activity it is not tied to a workout session.
samples is a fixed-cadence array of per-slot heart-rate readings starting at startTime, spaced intervalSeconds apart; null marks a missing slot (a sensor gap). A refinement requires at least one non-null sample — an all-gap series carries no information and is rejected.