import { z } from "zod"; //#region src/domain/schemas/length-unit.d.ts declare const lengthUnitSchema: z.ZodEnum<{ meters: "meters"; yards: "yards"; }>; type LengthUnit = z.infer; //#endregion //#region src/domain/converters/length-unit.converter.d.ts declare const convertLengthToMeters: (length: number, unit: LengthUnit) => number; //#endregion //#region src/domain/schemas/krd/event.d.ts /** * Zod schema for KRD event object. * * Validates workout events (start, stop, pause, lap, etc.). * * @example * ```typescript * import { krdEventSchema } from '@kaiord/core'; * * const event = krdEventSchema.parse({ * timestamp: '2025-01-15T10:30:00Z', * eventType: 'event_lap', * data: 1 * }); * ``` */ declare const krdEventSchema: z.ZodObject<{ timestamp: z.ZodISODateTime; eventType: z.ZodEnum<{ event_activity_start: "event_activity_start"; event_lap: "event_lap"; event_marker: "event_marker"; event_pause: "event_pause"; event_resume: "event_resume"; event_session_start: "event_session_start"; event_start: "event_start"; event_stop: "event_stop"; event_timer: "event_timer"; event_workout_step_change: "event_workout_step_change"; }>; eventGroup: z.ZodOptional; data: z.ZodOptional; message: z.ZodOptional; }, z.core.$strip>; /** * TypeScript type for KRD event, inferred from {@link krdEventSchema}. * * Represents a workout event (start, stop, pause, lap, etc.). */ type KRDEvent = z.infer; //#endregion //#region src/domain/schemas/krd/lap.d.ts /** * KRD lap trigger types - what caused the lap to be recorded. */ declare const krdLapTriggerSchema: z.ZodEnum<{ distance: "distance"; fitness_equipment: "fitness_equipment"; manual: "manual"; position: "position"; session_end: "session_end"; time: "time"; }>; type KRDLapTrigger = z.infer; /** * Zod schema for KRD lap object. * * Validates lap/interval data within a session. */ declare const krdLapSchema: z.ZodObject<{ startTime: z.ZodISODateTime; totalElapsedTime: z.ZodNumber; totalTimerTime: z.ZodOptional; totalDistance: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; totalCalories: z.ZodOptional; trigger: z.ZodOptional>; sport: z.ZodOptional>; subSport: z.ZodOptional>; workoutStepIndex: z.ZodOptional; numLengths: z.ZodOptional; swimStroke: z.ZodOptional>; }, z.core.$strip>; /** * TypeScript type for KRD lap, inferred from {@link krdLapSchema}. */ type KRDLap = z.infer; //#endregion //#region src/domain/schemas/krd/metadata.d.ts /** * Zod schema for KRD metadata object. * * Validates file-level metadata including creation timestamp, device information, and sport type. * * @example * ```typescript * import { krdMetadataSchema } from '@kaiord/core'; * * // Validate metadata * const result = krdMetadataSchema.safeParse({ * created: '2025-01-15T10:30:00Z', * manufacturer: 'garmin', * product: 'fenix7', * sport: 'running', * subSport: 'trail' * }); * * if (result.success) { * console.log('Valid metadata:', result.data); * } * ``` */ declare const krdMetadataSchema: z.ZodObject<{ created: z.ZodISODateTime; manufacturer: z.ZodOptional; product: z.ZodOptional; serialNumber: z.ZodOptional; sport: z.ZodOptional; subSport: z.ZodOptional; }, z.core.$strip>; /** * TypeScript type for KRD metadata, inferred from {@link krdMetadataSchema}. * * Contains file-level metadata including creation timestamp, device information, and sport type. */ type KRDMetadata = z.infer; //#endregion //#region src/domain/schemas/krd/record.d.ts /** * Zod schema for KRD record object. * * Validates time-series data points (typically 1Hz or higher). * * @example * ```typescript * import { krdRecordSchema } from '@kaiord/core'; * * const record = krdRecordSchema.parse({ * timestamp: '2025-01-15T10:30:00Z', * position: { lat: 41.3851, lon: 2.1734 }, * altitude: 12.5, * heartRate: 145, * power: 250 * }); * ``` */ declare const krdRecordSchema: z.ZodObject<{ timestamp: z.ZodISODateTime; position: z.ZodOptional>; altitude: z.ZodOptional; heartRate: z.ZodOptional; cadence: z.ZodOptional; power: z.ZodOptional; speed: z.ZodOptional; distance: z.ZodOptional; temperature: z.ZodOptional; verticalOscillation: z.ZodOptional; stanceTime: z.ZodOptional; stepLength: z.ZodOptional; }, z.core.$strip>; /** * TypeScript type for KRD record, inferred from {@link krdRecordSchema}. * * Represents a time-series data point with GPS, heart rate, power, and other metrics. */ type KRDRecord = z.infer; //#endregion //#region src/domain/schemas/krd/session.d.ts /** * Zod schema for KRD session object. * * Validates training session data including timing, distance, and performance metrics. * * @example * ```typescript * import { krdSessionSchema } from '@kaiord/core'; * * const session = krdSessionSchema.parse({ * startTime: '2025-01-15T10:30:00Z', * totalElapsedTime: 3600, * totalDistance: 10000, * sport: 'running', * avgHeartRate: 145, * avgPower: 250 * }); * ``` */ declare const krdSessionSchema: z.ZodObject<{ startTime: z.ZodISODateTime; totalElapsedTime: z.ZodNumber; totalTimerTime: z.ZodOptional; totalDistance: z.ZodOptional; sport: z.ZodString; subSport: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; trainingStressScore: z.ZodOptional; intensityFactor: z.ZodOptional; totalCalories: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; }, z.core.$strip>; /** * TypeScript type for KRD session, inferred from {@link krdSessionSchema}. * * Represents a complete training session with timing, distance, and performance metrics. */ type KRDSession = z.infer; //#endregion //#region src/domain/schemas/krd/index.d.ts /** * Tagged shape for KRD `extensions`. * * Reserved namespaces are validated when present: * - `structured_workout`, `fit`, `course`, `course_points` carry adapter- * specific payloads whose shape is narrowed by downstream consumers * (e.g. the SPA editor's `ui-workout` view). * - `health.` payloads are validated against the `health-data` * capability sub-schemas. * * `catchall(z.unknown())` keeps unknown adapter-defined namespaces * round-trippable per the extension preservation rule in * `openspec/specs/krd-format`. */ declare const krdExtensionsSchema: z.ZodObject<{ structured_workout: z.ZodOptional; fit: z.ZodOptional; course: z.ZodOptional; course_points: z.ZodOptional; health: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; totalDurationSeconds: z.ZodNumber; stages: z.ZodArray; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>>; score: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; weight: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; weightKilograms: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; hrv: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; rMSSD: z.ZodNumber; measurementWindow: z.ZodEnum<{ overnight: "overnight"; spot: "spot"; }>; score: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; daily: z.ZodOptional; version: z.ZodString; date: z.ZodISODate; steps: z.ZodNumber; activeCalories: z.ZodNumber; restingCalories: z.ZodNumber; intensityMinutes: z.ZodObject<{ moderate: z.ZodNumber; vigorous: z.ZodNumber; }, z.core.$strip>; floorsClimbed: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; bodyComposition: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; bodyFatPercent: z.ZodOptional; leanMassKilograms: z.ZodOptional; boneMassKilograms: z.ZodOptional; bodyWaterPercent: z.ZodOptional; bmi: z.ZodOptional; visceralFatRating: z.ZodOptional; basalMetabolicRateKcal: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; stress: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; averageLevel: z.ZodNumber; peakLevel: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>>; }, z.core.$catchall>; type KRDExtensions = z.infer; /** * Zod schema for the complete KRD (Kaiord Representation Definition) format. * * KRD is a JSON-based canonical format for structured workout, recorded * activity, course, and (as of v2.0) health-domain data. The `type` field * is the top-level discriminator and gates the conditional `metadata.sport` * invariant: * * - For `structured_workout`, `recorded_activity`, `course` — * `metadata.sport` MUST be a non-empty string (preserved from v1.x). * - For the six health types — `metadata.sport` MUST be absent or empty. * * MIME type: `application/vnd.kaiord+json` * * @example * ```typescript * import { krdSchema } from '@kaiord/core'; * * const krd = krdSchema.parse({ * version: '2.0', * type: 'sleep_record', * metadata: { created: '2026-05-22T07:00:00Z' }, * extensions: { * health: { * sleep: { ... } * } * } * }); * ``` */ declare const krdSchema: z.ZodObject<{ version: z.ZodString; type: z.ZodEnum<{ body_composition: "body_composition"; course: "course"; daily_wellness: "daily_wellness"; hrv_summary: "hrv_summary"; recorded_activity: "recorded_activity"; sleep_record: "sleep_record"; stress_episode: "stress_episode"; structured_workout: "structured_workout"; weight_measurement: "weight_measurement"; }>; metadata: z.ZodObject<{ created: z.ZodISODateTime; manufacturer: z.ZodOptional; product: z.ZodOptional; serialNumber: z.ZodOptional; sport: z.ZodOptional; subSport: z.ZodOptional; }, z.core.$strip>; sessions: z.ZodOptional; totalDistance: z.ZodOptional; sport: z.ZodString; subSport: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; trainingStressScore: z.ZodOptional; intensityFactor: z.ZodOptional; totalCalories: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; }, z.core.$strip>>>; laps: z.ZodOptional; totalDistance: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; totalCalories: z.ZodOptional; trigger: z.ZodOptional>; sport: z.ZodOptional>; subSport: z.ZodOptional>; workoutStepIndex: z.ZodOptional; numLengths: z.ZodOptional; swimStroke: z.ZodOptional>; }, z.core.$strip>>>; records: z.ZodOptional>; altitude: z.ZodOptional; heartRate: z.ZodOptional; cadence: z.ZodOptional; power: z.ZodOptional; speed: z.ZodOptional; distance: z.ZodOptional; temperature: z.ZodOptional; verticalOscillation: z.ZodOptional; stanceTime: z.ZodOptional; stepLength: z.ZodOptional; }, z.core.$strip>>>; events: z.ZodOptional; eventGroup: z.ZodOptional; data: z.ZodOptional; message: z.ZodOptional; }, z.core.$strip>>>; extensions: z.ZodOptional; fit: z.ZodOptional; course: z.ZodOptional; course_points: z.ZodOptional; health: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; totalDurationSeconds: z.ZodNumber; stages: z.ZodArray; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>>; score: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; weight: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; weightKilograms: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; hrv: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; rMSSD: z.ZodNumber; measurementWindow: z.ZodEnum<{ overnight: "overnight"; spot: "spot"; }>; score: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; daily: z.ZodOptional; version: z.ZodString; date: z.ZodISODate; steps: z.ZodNumber; activeCalories: z.ZodNumber; restingCalories: z.ZodNumber; intensityMinutes: z.ZodObject<{ moderate: z.ZodNumber; vigorous: z.ZodNumber; }, z.core.$strip>; floorsClimbed: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; bodyComposition: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; bodyFatPercent: z.ZodOptional; leanMassKilograms: z.ZodOptional; boneMassKilograms: z.ZodOptional; bodyWaterPercent: z.ZodOptional; bmi: z.ZodOptional; visceralFatRating: z.ZodOptional; basalMetabolicRateKcal: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; stress: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; averageLevel: z.ZodNumber; peakLevel: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>>; }, z.core.$catchall>>; }, z.core.$strip>; /** * TypeScript type for the complete KRD format, inferred from {@link krdSchema}. * * KRD (Kaiord Representation Definition) is the canonical JSON format for workout, activity, course, and health data. */ type KRD = z.infer; //#endregion //#region src/domain/converters/workout-to-krd.converter.d.ts type CreateWorkoutKRDOptions = { created?: string; }; /** * Creates a valid KRD envelope for a structured workout. * * Validates unknown input against workoutSchema before wrapping. * Designed as a validation boundary for agent-provided data. * * @param workout - Unknown data to validate and wrap in KRD format * @param options - Optional overrides (created timestamp for testability) * @returns Valid KRD with type "structured_workout" * @throws {KrdValidationError} If workout validation fails */ declare const createWorkoutKRD: (workout: unknown, options?: CreateWorkoutKRDOptions) => KRD; //#endregion //#region src/domain/hash/canonical-hash.d.ts declare const canonicalHash: (value: Record) => string; //#endregion //#region src/domain/ingest/derive-external-id.d.ts /** * Derives a stable external id for a health record from its payload + * measuredAt timestamp. * * The `k1:` prefix is a version tag: if the hash projection ever changes, * the prefix can be bumped to `k2:` so downstream migration code can * distinguish old ids from new ones without inspecting content. */ declare const deriveExternalId: (input: { payload: Record; measuredAt: string; }) => string; //#endregion //#region src/domain/managed-data-type-registry.d.ts declare const MANAGED_DATA_REGISTRY: Record; //#endregion //#region src/domain/managed-data-type.d.ts declare const managedDataTypes: readonly ["workout", "planned-session", "activity", "training-zones", "weight", "sleep", "hrv", "daily-wellness", "body-composition", "stress", "strain", "vitals", "heart-rate-series"]; type ManagedDataType = (typeof managedDataTypes)[number]; /** Opaque bridge identifier — a stable string per bridge package (A-9). */ type BridgeId = string; /** Projects a payload to the canonical fields that determine identity. */ type HashProjection

= (payload: P) => Record; type ManagedDataRegistryEntry = { label: string; schema: z.ZodTypeAny; capabilities: { import?: string; export?: string; }; hashProjection?: HashProjection; }; //#endregion //#region src/domain/schemas/workout-step.d.ts /** * Zod schema for a workout step. * * Validates an individual interval or segment within a workout, * including duration, target, and intensity. */ declare const workoutStepSchema: z.ZodObject<{ stepIndex: z.ZodNumber; name: z.ZodOptional; durationType: z.ZodEnum<{ calories: "calories"; distance: "distance"; heart_rate_less_than: "heart_rate_less_than"; open: "open"; power_greater_than: "power_greater_than"; power_less_than: "power_less_than"; repeat_until_calories: "repeat_until_calories"; repeat_until_distance: "repeat_until_distance"; repeat_until_heart_rate_greater_than: "repeat_until_heart_rate_greater_than"; repeat_until_heart_rate_less_than: "repeat_until_heart_rate_less_than"; repeat_until_power_greater_than: "repeat_until_power_greater_than"; repeat_until_power_less_than: "repeat_until_power_less_than"; repeat_until_time: "repeat_until_time"; time: "time"; }>; duration: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"time">; seconds: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"distance">; meters: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate_less_than">; bpm: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_greater_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"calories">; calories: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_less_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_greater_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_time">; seconds: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_distance">; meters: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_calories">; calories: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_less_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_less_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_greater_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; targetType: z.ZodEnum<{ cadence: "cadence"; heart_rate: "heart_rate"; open: "open"; pace: "pace"; power: "power"; stroke_type: "stroke_type"; }>; target: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"power">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"cadence">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pace">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stroke_type">; value: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; intensity: z.ZodOptional>; notes: z.ZodOptional; equipment: z.ZodOptional>; extensions: z.ZodOptional>; }, z.core.$strip>; /** * TypeScript type for a workout step, inferred from {@link workoutStepSchema}. * * Represents an individual interval or segment within a workout. */ type WorkoutStep = z.infer; //#endregion //#region src/domain/schemas/workout.d.ts /** * Zod schema for a repetition block. * * Validates a group of workout steps that repeat multiple times. */ declare const repetitionBlockSchema: z.ZodObject<{ id: z.ZodOptional; repeatCount: z.ZodNumber; steps: z.ZodArray; durationType: z.ZodEnum<{ calories: "calories"; distance: "distance"; heart_rate_less_than: "heart_rate_less_than"; open: "open"; power_greater_than: "power_greater_than"; power_less_than: "power_less_than"; repeat_until_calories: "repeat_until_calories"; repeat_until_distance: "repeat_until_distance"; repeat_until_heart_rate_greater_than: "repeat_until_heart_rate_greater_than"; repeat_until_heart_rate_less_than: "repeat_until_heart_rate_less_than"; repeat_until_power_greater_than: "repeat_until_power_greater_than"; repeat_until_power_less_than: "repeat_until_power_less_than"; repeat_until_time: "repeat_until_time"; time: "time"; }>; duration: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"time">; seconds: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"distance">; meters: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate_less_than">; bpm: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_greater_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"calories">; calories: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_less_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_greater_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_time">; seconds: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_distance">; meters: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_calories">; calories: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_less_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_less_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_greater_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; targetType: z.ZodEnum<{ cadence: "cadence"; heart_rate: "heart_rate"; open: "open"; pace: "pace"; power: "power"; stroke_type: "stroke_type"; }>; target: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"power">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"cadence">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pace">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stroke_type">; value: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; intensity: z.ZodOptional>; notes: z.ZodOptional; equipment: z.ZodOptional>; extensions: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; /** * Zod schema for a complete workout definition. * * Validates a structured workout with metadata and a sequence of steps * or repetition blocks. * * `stepIndex` values on steps are advisory ordering metadata: producers * SHOULD emit 0-based contiguous indices, but the schema deliberately * does not enforce contiguity or uniqueness — adapters renumber steps * when flattening repetition blocks (see the garmin adapter's * flatten-segments converter) and consumers MUST rely on array order, * not on index arithmetic. * * `poolLength` is bounded to [1, 655] meters — generous enough for * endless pools (~5 m) and the FIT protocol envelope, while rejecting * nonsense values like 0.0001 or 99999. KRD always stores pool length * normalized to meters; adapters that accept yard-based pools convert on * ingest (see `length-unit.converter`), so `poolLengthUnit` is fixed to * `"meters"` here rather than carrying the source unit. */ declare const workoutSchema: z.ZodObject<{ name: z.ZodOptional; notes: z.ZodOptional; sport: z.ZodEnum<{ alpine_skiing: "alpine_skiing"; american_football: "american_football"; archery: "archery"; baseball: "baseball"; basketball: "basketball"; boating: "boating"; boxing: "boxing"; canoeing: "canoeing"; cricket: "cricket"; cross_country_skiing: "cross_country_skiing"; cycling: "cycling"; dance: "dance"; disc_golf: "disc_golf"; diving: "diving"; driving: "driving"; e_biking: "e_biking"; fishing: "fishing"; fitness_equipment: "fitness_equipment"; floor_climbing: "floor_climbing"; flying: "flying"; generic: "generic"; geocaching: "geocaching"; golf: "golf"; grinding: "grinding"; hang_gliding: "hang_gliding"; hiit: "hiit"; hiking: "hiking"; hockey: "hockey"; horseback_riding: "horseback_riding"; hunting: "hunting"; ice_skating: "ice_skating"; inline_skating: "inline_skating"; jump_rope: "jump_rope"; jumpmaster: "jumpmaster"; kayaking: "kayaking"; kitesurfing: "kitesurfing"; lacrosse: "lacrosse"; meditation: "meditation"; mixed_martial_arts: "mixed_martial_arts"; mobility: "mobility"; motor_sports: "motor_sports"; motorcycling: "motorcycling"; mountaineering: "mountaineering"; multisport: "multisport"; paddling: "paddling"; para_sport: "para_sport"; pool_apnea: "pool_apnea"; racket: "racket"; rafting: "rafting"; rock_climbing: "rock_climbing"; rowing: "rowing"; rugby: "rugby"; running: "running"; sailing: "sailing"; shooting: "shooting"; sky_diving: "sky_diving"; snorkeling: "snorkeling"; snowboarding: "snowboarding"; snowmobiling: "snowmobiling"; snowshoeing: "snowshoeing"; soccer: "soccer"; stand_up_paddleboarding: "stand_up_paddleboarding"; surfing: "surfing"; swimming: "swimming"; tactical: "tactical"; team_sport: "team_sport"; tennis: "tennis"; training: "training"; transition: "transition"; video_gaming: "video_gaming"; volleyball: "volleyball"; wakeboarding: "wakeboarding"; wakesurfing: "wakesurfing"; walking: "walking"; water_skiing: "water_skiing"; water_sport: "water_sport"; water_tubing: "water_tubing"; wheelchair_push_run: "wheelchair_push_run"; wheelchair_push_walk: "wheelchair_push_walk"; windsurfing: "windsurfing"; winter_sport: "winter_sport"; }>; subSport: z.ZodOptional>; poolLength: z.ZodOptional; poolLengthUnit: z.ZodOptional>; steps: z.ZodArray; durationType: z.ZodEnum<{ calories: "calories"; distance: "distance"; heart_rate_less_than: "heart_rate_less_than"; open: "open"; power_greater_than: "power_greater_than"; power_less_than: "power_less_than"; repeat_until_calories: "repeat_until_calories"; repeat_until_distance: "repeat_until_distance"; repeat_until_heart_rate_greater_than: "repeat_until_heart_rate_greater_than"; repeat_until_heart_rate_less_than: "repeat_until_heart_rate_less_than"; repeat_until_power_greater_than: "repeat_until_power_greater_than"; repeat_until_power_less_than: "repeat_until_power_less_than"; repeat_until_time: "repeat_until_time"; time: "time"; }>; duration: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"time">; seconds: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"distance">; meters: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate_less_than">; bpm: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_greater_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"calories">; calories: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_less_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_greater_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_time">; seconds: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_distance">; meters: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_calories">; calories: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_less_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_less_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_greater_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; targetType: z.ZodEnum<{ cadence: "cadence"; heart_rate: "heart_rate"; open: "open"; pace: "pace"; power: "power"; stroke_type: "stroke_type"; }>; target: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"power">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"cadence">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pace">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stroke_type">; value: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; intensity: z.ZodOptional>; notes: z.ZodOptional; equipment: z.ZodOptional>; extensions: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodOptional; repeatCount: z.ZodNumber; steps: z.ZodArray; durationType: z.ZodEnum<{ calories: "calories"; distance: "distance"; heart_rate_less_than: "heart_rate_less_than"; open: "open"; power_greater_than: "power_greater_than"; power_less_than: "power_less_than"; repeat_until_calories: "repeat_until_calories"; repeat_until_distance: "repeat_until_distance"; repeat_until_heart_rate_greater_than: "repeat_until_heart_rate_greater_than"; repeat_until_heart_rate_less_than: "repeat_until_heart_rate_less_than"; repeat_until_power_greater_than: "repeat_until_power_greater_than"; repeat_until_power_less_than: "repeat_until_power_less_than"; repeat_until_time: "repeat_until_time"; time: "time"; }>; duration: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"time">; seconds: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"distance">; meters: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate_less_than">; bpm: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_greater_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"calories">; calories: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_less_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_greater_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_time">; seconds: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_distance">; meters: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_calories">; calories: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_less_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_less_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_greater_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; targetType: z.ZodEnum<{ cadence: "cadence"; heart_rate: "heart_rate"; open: "open"; pace: "pace"; power: "power"; stroke_type: "stroke_type"; }>; target: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"power">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"cadence">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pace">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stroke_type">; value: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; intensity: z.ZodOptional>; notes: z.ZodOptional; equipment: z.ZodOptional>; extensions: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>]>>; extensions: z.ZodOptional>; }, z.core.$strip>; /** * TypeScript type for a repetition block, inferred from {@link repetitionBlockSchema}. * * Represents a group of workout steps that repeat multiple times. */ type RepetitionBlock = z.infer; /** * TypeScript type for a complete workout, inferred from {@link workoutSchema}. * * Represents a structured workout definition with metadata and steps. */ type Workout = z.infer; //#endregion //#region src/domain/schemas/planned-session.d.ts /** * Coach-owned workflow state for a planned session. Mirrors the discrete * lifecycle carried on the persisted coaching record. */ declare const plannedSessionStatusSchema: z.ZodEnum<{ completed: "completed"; pending: "pending"; skipped: "skipped"; }>; type PlannedSessionStatus = z.infer; /** * Zod schema for a `planned-session` — a single coach-prescribed session * (what Train2Go delivers per calendar day). Replaces the decorative * `training-plan` managed type: the routable unit is the individual * session; the "plan" is the collection of sessions on the calendar. * * Snake_case per the domain schema convention. Fields are derived from the * persisted `CoachingActivityRecord` so a coaching activity maps to a * planned session without loss: external identity, date, sport, prescribed * load/intensity, coach notes, and workflow status. */ declare const plannedSessionSchema: z.ZodObject<{ kind: z.ZodLiteral<"planned_session">; date: z.ZodISODate; sport: z.ZodString; title: z.ZodString; coach_notes: z.ZodOptional; duration_seconds: z.ZodOptional; workload: z.ZodOptional; intensity: z.ZodOptional; status: z.ZodEnum<{ completed: "completed"; pending: "pending"; skipped: "skipped"; }>; completion_percent: z.ZodOptional; source: z.ZodString; source_id: z.ZodString; }, z.core.$strip>; type PlannedSession = z.infer; //#endregion //#region src/domain/schemas/activity.d.ts /** * Zod schema for the lightweight summary carried by every `activity` * (executed session). The summary is always present — the calendar and * SessionMatch read from it — while the full recorded detail is optional * (see {@link activitySchema}). */ declare const activitySummarySchema: z.ZodObject<{ date: z.ZodISODate; start_time: z.ZodOptional; sport: z.ZodString; sub_sport: z.ZodOptional; duration_seconds: z.ZodOptional; distance_meters: z.ZodOptional; avg_heart_rate: z.ZodOptional; avg_power: z.ZodOptional; total_calories: z.ZodOptional; source: z.ZodString; source_id: z.ZodString; }, z.core.$strip>; type ActivitySummary = z.infer; /** * Zod schema for an `activity` — a first-class executed session (the * executed side of a SessionMatch). Shape mirrors the health records' * `{ summary, krd? }` split: a mandatory summary for list/match reads plus * the optional full KRD payload attached when the source provides recorded * detail (records/laps/sessions). */ declare const activitySchema: z.ZodObject<{ kind: z.ZodLiteral<"activity">; summary: z.ZodObject<{ date: z.ZodISODate; start_time: z.ZodOptional; sport: z.ZodString; sub_sport: z.ZodOptional; duration_seconds: z.ZodOptional; distance_meters: z.ZodOptional; avg_heart_rate: z.ZodOptional; avg_power: z.ZodOptional; total_calories: z.ZodOptional; source: z.ZodString; source_id: z.ZodString; }, z.core.$strip>; krd: z.ZodOptional; metadata: z.ZodObject<{ created: z.ZodISODateTime; manufacturer: z.ZodOptional; product: z.ZodOptional; serialNumber: z.ZodOptional; sport: z.ZodOptional; subSport: z.ZodOptional; }, z.core.$strip>; sessions: z.ZodOptional; totalDistance: z.ZodOptional; sport: z.ZodString; subSport: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; trainingStressScore: z.ZodOptional; intensityFactor: z.ZodOptional; totalCalories: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; }, z.core.$strip>>>; laps: z.ZodOptional; totalDistance: z.ZodOptional; avgHeartRate: z.ZodOptional; maxHeartRate: z.ZodOptional; avgCadence: z.ZodOptional; maxCadence: z.ZodOptional; avgPower: z.ZodOptional; maxPower: z.ZodOptional; normalizedPower: z.ZodOptional; avgSpeed: z.ZodOptional; maxSpeed: z.ZodOptional; totalAscent: z.ZodOptional; totalDescent: z.ZodOptional; totalCalories: z.ZodOptional; trigger: z.ZodOptional>; sport: z.ZodOptional>; subSport: z.ZodOptional>; workoutStepIndex: z.ZodOptional; numLengths: z.ZodOptional; swimStroke: z.ZodOptional>; }, z.core.$strip>>>; records: z.ZodOptional>; altitude: z.ZodOptional; heartRate: z.ZodOptional; cadence: z.ZodOptional; power: z.ZodOptional; speed: z.ZodOptional; distance: z.ZodOptional; temperature: z.ZodOptional; verticalOscillation: z.ZodOptional; stanceTime: z.ZodOptional; stepLength: z.ZodOptional; }, z.core.$strip>>>; events: z.ZodOptional; eventGroup: z.ZodOptional; data: z.ZodOptional; message: z.ZodOptional; }, z.core.$strip>>>; extensions: z.ZodOptional; fit: z.ZodOptional; course: z.ZodOptional; course_points: z.ZodOptional; health: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; totalDurationSeconds: z.ZodNumber; stages: z.ZodArray; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>>; score: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; weight: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; weightKilograms: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; hrv: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; rMSSD: z.ZodNumber; measurementWindow: z.ZodEnum<{ overnight: "overnight"; spot: "spot"; }>; score: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; daily: z.ZodOptional; version: z.ZodString; date: z.ZodISODate; steps: z.ZodNumber; activeCalories: z.ZodNumber; restingCalories: z.ZodNumber; intensityMinutes: z.ZodObject<{ moderate: z.ZodNumber; vigorous: z.ZodNumber; }, z.core.$strip>; floorsClimbed: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; bodyComposition: z.ZodOptional; version: z.ZodString; measuredAt: z.ZodISODateTime; bodyFatPercent: z.ZodOptional; leanMassKilograms: z.ZodOptional; boneMassKilograms: z.ZodOptional; bodyWaterPercent: z.ZodOptional; bmi: z.ZodOptional; visceralFatRating: z.ZodOptional; basalMetabolicRateKcal: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; stress: z.ZodOptional; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; averageLevel: z.ZodNumber; peakLevel: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>>; }, z.core.$catchall>>; }, z.core.$strip>>; }, z.core.$strip>; type Activity = z.infer; //#endregion //#region src/domain/schemas/training-zones.d.ts /** A single band within a zone set (e.g. Coggan power zone 4). */ declare const trainingZoneBandSchema: z.ZodObject<{ zone: z.ZodNumber; min: z.ZodNumber; max: z.ZodOptional; label: z.ZodOptional; }, z.core.$strip>; type TrainingZoneBand = z.infer; /** An ordered set of bands for one quantity (power / heart rate / pace). */ declare const trainingZoneSetSchema: z.ZodObject<{ metric: z.ZodEnum<{ heart_rate: "heart_rate"; pace: "pace"; power: "power"; }>; method: z.ZodOptional; bands: z.ZodArray; label: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type TrainingZoneSet = z.infer; /** * Zod schema for `training-zones` — a per-sport set of training zone * definitions imported from a coaching source. Snake_case per the domain * schema convention. Replaces the former `z.unknown()` passthrough so the * managed-data registry validates every type it routes. */ declare const trainingZonesSchema: z.ZodObject<{ kind: z.ZodLiteral<"training_zones">; sport: z.ZodString; threshold: z.ZodOptional; sets: z.ZodArray; method: z.ZodOptional; bands: z.ZodArray; label: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; type TrainingZones = z.infer; //#endregion //#region src/domain/schemas/duration-type.d.ts /** * Zod schema for duration type enumeration. * * Defines all possible duration types for workout steps. * * @example * ```typescript * import { durationTypeSchema } from '@kaiord/core'; * * const timeType = durationTypeSchema.enum.time; * const distanceType = durationTypeSchema.enum.distance; * * const result = durationTypeSchema.safeParse('time'); * ``` */ declare const durationTypeSchema: z.ZodEnum<{ calories: "calories"; distance: "distance"; heart_rate_less_than: "heart_rate_less_than"; open: "open"; power_greater_than: "power_greater_than"; power_less_than: "power_less_than"; repeat_until_calories: "repeat_until_calories"; repeat_until_distance: "repeat_until_distance"; repeat_until_heart_rate_greater_than: "repeat_until_heart_rate_greater_than"; repeat_until_heart_rate_less_than: "repeat_until_heart_rate_less_than"; repeat_until_power_greater_than: "repeat_until_power_greater_than"; repeat_until_power_less_than: "repeat_until_power_less_than"; repeat_until_time: "repeat_until_time"; time: "time"; }>; /** * TypeScript type for duration type, inferred from {@link durationTypeSchema}. * * String literal union of all possible duration types. */ type DurationType = z.infer; //#endregion //#region src/domain/schemas/duration.d.ts /** * Zod schema for workout step duration. * * Validates duration specifications using discriminated unions based on duration type. * Supports time-based, distance-based, heart rate conditional, power conditional, * calorie-based, and open durations. * * `repeatFrom` (on the `repeat_until_*` variants) is a 0-based **step * index**, not a repeat count: execution jumps back to the step at that * index and repeats the steps from there up to the current one until the * variant's condition is met (elapsed time, distance, calories, or the * HR/power threshold crossing). */ declare const durationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"time">; seconds: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"distance">; meters: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate_less_than">; bpm: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_greater_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"calories">; calories: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_less_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"power_greater_than">; watts: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_time">; seconds: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_distance">; meters: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_calories">; calories: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_heart_rate_less_than">; bpm: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_less_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"repeat_until_power_greater_than">; watts: z.ZodNumber; repeatFrom: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; /** * TypeScript type for workout step duration, inferred from {@link durationSchema}. * * Discriminated union type representing all possible duration specifications. */ type Duration = z.infer; //#endregion //#region src/domain/schemas/target-type.d.ts /** * Zod schema for target type enumeration. * * Defines all possible target types for workout steps. * * @example * ```typescript * import { targetTypeSchema } from '@kaiord/core'; * * const powerType = targetTypeSchema.enum.power; * const hrType = targetTypeSchema.enum.heart_rate; * * const result = targetTypeSchema.safeParse('power'); * ``` */ declare const targetTypeSchema: z.ZodEnum<{ cadence: "cadence"; heart_rate: "heart_rate"; open: "open"; pace: "pace"; power: "power"; stroke_type: "stroke_type"; }>; /** * TypeScript type for target type, inferred from {@link targetTypeSchema}. * * String literal union of all possible target types. */ type TargetType = z.infer; //#endregion //#region src/domain/schemas/target-values/cadence.d.ts /** * Zod schema for cadence target values. * * Validates cadence targets in RPM or ranges. Values are capped at * 300 rpm (above running step-rate targets, which are expressed in * steps per minute). Range targets enforce `min <= max`. * * @example * ```typescript * import { cadenceValueSchema } from '@kaiord/core'; * * // Absolute RPM * const rpm = cadenceValueSchema.parse({ unit: 'rpm', value: 90 }); * * // Cadence range * const range = cadenceValueSchema.parse({ unit: 'range', min: 85, max: 95 }); * ``` */ declare const cadenceValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; /** * TypeScript type for cadence target value, inferred from {@link cadenceValueSchema}. * * Discriminated union representing cadence targets in various units. */ type CadenceValue = z.infer; //#endregion //#region src/domain/schemas/target-values/heart-rate.d.ts /** * Zod schema for heart rate target values. * * Validates heart rate targets in BPM, zones, percent max, or ranges. * BPM and range bounds are capped at 300 (matching the KRD record clamp); * percent max is capped at 100. Range targets enforce `min <= max`. * * @example * ```typescript * import { heartRateValueSchema } from '@kaiord/core'; * * // Absolute BPM * const bpm = heartRateValueSchema.parse({ unit: 'bpm', value: 145 }); * * // Heart rate zone * const zone = heartRateValueSchema.parse({ unit: 'zone', value: 2 }); * ``` */ declare const heartRateValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; /** * TypeScript type for heart rate target value, inferred from {@link heartRateValueSchema}. * * Discriminated union representing heart rate targets in various units. */ type HeartRateValue = z.infer; //#endregion //#region src/domain/schemas/target-values/pace.d.ts /** * Zod schema for pace target values. * * Validates pace targets in meters per second, zones, or ranges. * Speed values are capped at 30 m/s (above any human-powered speed, * including downhill cycling). Range targets enforce `min <= max`. * * @example * ```typescript * import { paceValueSchema } from '@kaiord/core'; * * // Absolute pace (m/s) * const mps = paceValueSchema.parse({ unit: 'mps', value: 3.5 }); * * // Pace zone * const zone = paceValueSchema.parse({ unit: 'zone', value: 2 }); * ``` */ declare const paceValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; /** * TypeScript type for pace target value, inferred from {@link paceValueSchema}. * * Discriminated union representing pace targets in various units. */ type PaceValue = z.infer; //#endregion //#region src/domain/schemas/target-values/power.d.ts /** * Zod schema for power target values. * * Validates power targets in watts, percent FTP, zones, or ranges. * Watts and range bounds are capped at 5000 W (above any recorded human * sprint peak); percent FTP is capped at 1000. Range targets enforce * `min <= max`. * * @example * ```typescript * import { powerValueSchema } from '@kaiord/core'; * * // Absolute watts * const watts = powerValueSchema.parse({ unit: 'watts', value: 250 }); * * // Percent FTP * const ftp = powerValueSchema.parse({ unit: 'percent_ftp', value: 85 }); * * // Power zone * const zone = powerValueSchema.parse({ unit: 'zone', value: 3 }); * ``` */ declare const powerValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; /** * TypeScript type for power target value, inferred from {@link powerValueSchema}. * * Discriminated union representing power targets in various units. */ type PowerValue = z.infer; //#endregion //#region src/domain/schemas/target-values/stroke-type.d.ts /** * Zod schema for stroke type target values. * * Validates swimming stroke type targets. `value` is the FIT protocol * swim-stroke code (0-5, see `SWIM_STROKE_TO_FIT`), NOT an index into * the seven-variant `swimStrokeSchema` enum — `im` and `mixed` both map * to FIT code 5, so `max(5)` is correct. * * @example * ```typescript * import { strokeTypeValueSchema } from '@kaiord/core'; * * const stroke = strokeTypeValueSchema.parse({ * unit: 'swim_stroke', * value: 0 // freestyle * }); * ``` */ declare const strokeTypeValueSchema: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; /** * TypeScript type for stroke type target value, inferred from {@link strokeTypeValueSchema}. * * Represents swimming stroke type targets. */ type StrokeTypeValue = z.infer; //#endregion //#region src/domain/schemas/target-values/unit.d.ts /** * Zod schema for target unit enumeration. * * Defines all possible units for target values (watts, zones, percentages, ranges, etc.). * * @example * ```typescript * import { targetUnitSchema } from '@kaiord/core'; * * // Access enum values * const watts = targetUnitSchema.enum.watts; * const zone = targetUnitSchema.enum.zone; * ``` */ declare const targetUnitSchema: z.ZodEnum<{ bpm: "bpm"; mps: "mps"; percent_ftp: "percent_ftp"; percent_max: "percent_max"; range: "range"; rpm: "rpm"; swim_stroke: "swim_stroke"; watts: "watts"; zone: "zone"; }>; /** * TypeScript type for target unit, inferred from {@link targetUnitSchema}. * * String literal union of all possible target units. */ type TargetUnit = z.infer; //#endregion //#region src/domain/schemas/target.d.ts /** * Zod schema for workout step target. * * Validates target specifications using discriminated unions based on target type. * Supports power, heart rate, cadence, pace, stroke type, and open targets. */ declare const targetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"power">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"watts">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_ftp">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"heart_rate">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"percent_max">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"cadence">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"rpm">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pace">; value: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"mps">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"zone">; value: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"range">; min: z.ZodNumber; max: z.ZodNumber; }, z.core.$strip>], "unit">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stroke_type">; value: z.ZodObject<{ unit: z.ZodLiteral<"swim_stroke">; value: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"open">; }, z.core.$strip>], "type">; /** * TypeScript type for workout step target, inferred from {@link targetSchema}. * * Discriminated union type representing all possible target specifications. */ type Target = z.infer; //#endregion //#region src/domain/schemas/equipment.d.ts /** * Zod schema for equipment type enumeration. * * Defines swimming equipment types that can be specified for workout steps. * * @example * ```typescript * import { equipmentSchema } from '@kaiord/core'; * * // Access enum values * const fins = equipmentSchema.enum.swim_fins; * const kickboard = equipmentSchema.enum.swim_kickboard; * * // Validate equipment * const result = equipmentSchema.safeParse('swim_fins'); * if (result.success) { * console.log('Valid equipment:', result.data); * } * ``` */ declare const equipmentSchema: z.ZodEnum<{ none: "none"; swim_fins: "swim_fins"; swim_kickboard: "swim_kickboard"; swim_paddles: "swim_paddles"; swim_pull_buoy: "swim_pull_buoy"; swim_snorkel: "swim_snorkel"; }>; /** * TypeScript type for equipment, inferred from {@link equipmentSchema}. * * String literal union of supported equipment types. */ type Equipment = z.infer; //#endregion //#region src/domain/schemas/intensity.d.ts /** * Zod schema for intensity level enumeration. * * Defines workout step intensity levels. * * @example * ```typescript * import { intensitySchema } from '@kaiord/core'; * * // Access enum values * const warmup = intensitySchema.enum.warmup; * const active = intensitySchema.enum.active; * * // Validate intensity * const result = intensitySchema.safeParse('warmup'); * if (result.success) { * console.log('Valid intensity:', result.data); * } * ``` */ declare const intensitySchema: z.ZodEnum<{ active: "active"; cooldown: "cooldown"; interval: "interval"; other: "other"; recovery: "recovery"; rest: "rest"; warmup: "warmup"; }>; /** * TypeScript type for intensity level, inferred from {@link intensitySchema}. * * String literal union of supported intensity levels. */ type Intensity = z.infer; //#endregion //#region src/domain/schemas/sport.d.ts /** * Primary sport types supported by KRD, anchored on the Garmin FIT `Sport` * enum (snake_case here; the FIT adapter maps to/from camelCase). `generic` * remains the terminal fallback. Granular variants live in `subSportSchema`. * * Access values via `.enum`, e.g. `sportSchema.enum.cycling`. */ declare const sportSchema: z.ZodEnum<{ alpine_skiing: "alpine_skiing"; american_football: "american_football"; archery: "archery"; baseball: "baseball"; basketball: "basketball"; boating: "boating"; boxing: "boxing"; canoeing: "canoeing"; cricket: "cricket"; cross_country_skiing: "cross_country_skiing"; cycling: "cycling"; dance: "dance"; disc_golf: "disc_golf"; diving: "diving"; driving: "driving"; e_biking: "e_biking"; fishing: "fishing"; fitness_equipment: "fitness_equipment"; floor_climbing: "floor_climbing"; flying: "flying"; generic: "generic"; geocaching: "geocaching"; golf: "golf"; grinding: "grinding"; hang_gliding: "hang_gliding"; hiit: "hiit"; hiking: "hiking"; hockey: "hockey"; horseback_riding: "horseback_riding"; hunting: "hunting"; ice_skating: "ice_skating"; inline_skating: "inline_skating"; jump_rope: "jump_rope"; jumpmaster: "jumpmaster"; kayaking: "kayaking"; kitesurfing: "kitesurfing"; lacrosse: "lacrosse"; meditation: "meditation"; mixed_martial_arts: "mixed_martial_arts"; mobility: "mobility"; motor_sports: "motor_sports"; motorcycling: "motorcycling"; mountaineering: "mountaineering"; multisport: "multisport"; paddling: "paddling"; para_sport: "para_sport"; pool_apnea: "pool_apnea"; racket: "racket"; rafting: "rafting"; rock_climbing: "rock_climbing"; rowing: "rowing"; rugby: "rugby"; running: "running"; sailing: "sailing"; shooting: "shooting"; sky_diving: "sky_diving"; snorkeling: "snorkeling"; snowboarding: "snowboarding"; snowmobiling: "snowmobiling"; snowshoeing: "snowshoeing"; soccer: "soccer"; stand_up_paddleboarding: "stand_up_paddleboarding"; surfing: "surfing"; swimming: "swimming"; tactical: "tactical"; team_sport: "team_sport"; tennis: "tennis"; training: "training"; transition: "transition"; video_gaming: "video_gaming"; volleyball: "volleyball"; wakeboarding: "wakeboarding"; wakesurfing: "wakesurfing"; walking: "walking"; water_skiing: "water_skiing"; water_sport: "water_sport"; water_tubing: "water_tubing"; wheelchair_push_run: "wheelchair_push_run"; wheelchair_push_walk: "wheelchair_push_walk"; windsurfing: "windsurfing"; winter_sport: "winter_sport"; }>; /** * String literal union of supported sport types, inferred from {@link sportSchema}. */ type Sport = z.infer; //#endregion //#region src/domain/schemas/sport-category.d.ts /** * Coarse capability category for a sport. Behavioural logic (zone/threshold * models, lossy adapter collapse to TCX/ZWO) branches on this category, never * on the open-ended {@link Sport} identity — so widening the sport vocabulary * never requires touching that logic. `other` is the default and behaves like * `generic` (no power/pace model; collapses to TCX `Other`). */ type SportCategory = "cycling" | "running" | "swimming" | "other"; /** * Classify a sport into its capability category. Unknown / non-endurance * sports (training, rowing, tennis, …) fall through to `other`. */ declare const sportCategory: (sport: Sport) => SportCategory; //#endregion //#region src/domain/schemas/sub-sport.d.ts /** * Zod schema for sub-sport type enumeration. * * Defines detailed sport subtypes for more specific categorization. * Uses snake_case for multi-word values following KRD format conventions. * * @example * ```typescript * import { subSportSchema } from '@kaiord/core'; * * // Access enum values * const trail = subSportSchema.enum.trail; * const indoorCycling = subSportSchema.enum.indoor_cycling; * * // Validate sub-sport * const result = subSportSchema.safeParse('trail'); * if (result.success) { * console.log('Valid sub-sport:', result.data); * } * ``` */ declare const subSportSchema: z.ZodEnum<{ all: "all"; apnea_diving: "apnea_diving"; apnea_hunting: "apnea_hunting"; atv: "atv"; backcountry: "backcountry"; bike_to_run_transition: "bike_to_run_transition"; bmx: "bmx"; cardio_training: "cardio_training"; casual_walking: "casual_walking"; challenge: "challenge"; commuting: "commuting"; cyclocross: "cyclocross"; downhill: "downhill"; e_bike_fitness: "e_bike_fitness"; e_bike_mountain: "e_bike_mountain"; elliptical: "elliptical"; exercise: "exercise"; flexibility_training: "flexibility_training"; gauge_diving: "gauge_diving"; generic: "generic"; gravel_cycling: "gravel_cycling"; hand_cycling: "hand_cycling"; indoor_cycling: "indoor_cycling"; indoor_rowing: "indoor_rowing"; indoor_running: "indoor_running"; indoor_skiing: "indoor_skiing"; indoor_walking: "indoor_walking"; lap_swimming: "lap_swimming"; map: "map"; match: "match"; mixed_surface: "mixed_surface"; motocross: "motocross"; mountain: "mountain"; multi_gas_diving: "multi_gas_diving"; navigate: "navigate"; obstacle: "obstacle"; open_water: "open_water"; pilates: "pilates"; rc_drone: "rc_drone"; recumbent: "recumbent"; resort: "resort"; road: "road"; run_to_bike_transition: "run_to_bike_transition"; single_gas_diving: "single_gas_diving"; skate_skiing: "skate_skiing"; speed_walking: "speed_walking"; spin: "spin"; stair_climbing: "stair_climbing"; street: "street"; strength_training: "strength_training"; swim_to_bike_transition: "swim_to_bike_transition"; track: "track"; track_cycling: "track_cycling"; track_me: "track_me"; trail: "trail"; treadmill: "treadmill"; virtual_activity: "virtual_activity"; warm_up: "warm_up"; whitewater: "whitewater"; wingsuit: "wingsuit"; yoga: "yoga"; }>; /** * TypeScript type for sub-sport, inferred from {@link subSportSchema}. * * String literal union of supported sub-sport types. */ type SubSport = z.infer; //#endregion //#region src/domain/schemas/swim-stroke.d.ts /** * Zod schema for swim stroke type enumeration. * * Defines swimming stroke types for workout steps. * * @example * ```typescript * import { swimStrokeSchema } from '@kaiord/core'; * * // Access enum values * const freestyle = swimStrokeSchema.enum.freestyle; * const backstroke = swimStrokeSchema.enum.backstroke; * * // Validate swim stroke * const result = swimStrokeSchema.safeParse('freestyle'); * if (result.success) { * console.log('Valid swim stroke:', result.data); * } * ``` */ declare const swimStrokeSchema: z.ZodEnum<{ backstroke: "backstroke"; breaststroke: "breaststroke"; butterfly: "butterfly"; drill: "drill"; freestyle: "freestyle"; im: "im"; mixed: "mixed"; }>; /** * TypeScript type for swim stroke, inferred from {@link swimStrokeSchema}. * * String literal union of supported swim stroke types. */ type SwimStroke = z.infer; /** * Bidirectional mapping from swim stroke to FIT protocol numeric values. * * Used for converting KRD swim strokes to FIT format. * * @example * ```typescript * import { SWIM_STROKE_TO_FIT } from '@kaiord/core'; * * const fitValue = SWIM_STROKE_TO_FIT.freestyle; // 0 * ``` */ declare const SWIM_STROKE_TO_FIT: { readonly freestyle: 0; readonly backstroke: 1; readonly breaststroke: 2; readonly butterfly: 3; readonly drill: 4; readonly mixed: 5; readonly im: 5; }; /** * Bidirectional mapping from FIT protocol numeric values to swim stroke. * * Used for converting FIT format to KRD swim strokes. * * @example * ```typescript * import { FIT_TO_SWIM_STROKE } from '@kaiord/core'; * * const stroke = FIT_TO_SWIM_STROKE[0]; // 'freestyle' * ``` */ declare const FIT_TO_SWIM_STROKE: Record; //#endregion //#region src/domain/schemas/file-type.d.ts /** * KRD `type` discriminator. * * The first three variants are the legacy workout/activity/course types * (KRD v1.x). The latter six are the health-metric types introduced in * KRD v2.0 (see the `health-data` capability). All nine values share the * same root KRD document shape; per-type invariants are enforced by the * `krdSchema` refinement (`metadata.sport` requirement) and by the * `extensions.health.*` discriminated union (`healthExtensionPayloadSchema`). */ declare const fileTypeSchema: z.ZodEnum<{ body_composition: "body_composition"; course: "course"; daily_wellness: "daily_wellness"; hrv_summary: "hrv_summary"; recorded_activity: "recorded_activity"; sleep_record: "sleep_record"; stress_episode: "stress_episode"; structured_workout: "structured_workout"; weight_measurement: "weight_measurement"; }>; type FileType = z.infer; /** * Legacy workout/activity/course types that require `metadata.sport`. */ declare const workoutLikeFileTypes: readonly ["structured_workout", "recorded_activity", "course"]; /** * Health-metric types introduced in KRD v2.0. They MUST NOT carry * `metadata.sport`; their payload lives in `extensions.health.`. */ declare const healthFileTypes: readonly ["sleep_record", "weight_measurement", "hrv_summary", "daily_wellness", "body_composition", "stress_episode"]; type HealthFileType = (typeof healthFileTypes)[number]; declare const isHealthFileType: (value: FileType) => value is HealthFileType; //#endregion //#region src/domain/schemas/health/body-composition.d.ts /** * Zod schema for `extensions.health.bodyComposition` — a body-composition * snapshot captured at a point in time. * * Each metric field is optional because devices vary in what they report * (a basic scale may emit only `bodyFatPercent`, a Garmin Index scale * emits the full set). A refinement requires that at least one metric * field be present so empty payloads are rejected. */ declare const bodyCompositionSchema: z.ZodObject<{ kind: z.ZodLiteral<"bodyComposition">; version: z.ZodString; measuredAt: z.ZodISODateTime; bodyFatPercent: z.ZodOptional; leanMassKilograms: z.ZodOptional; boneMassKilograms: z.ZodOptional; bodyWaterPercent: z.ZodOptional; bmi: z.ZodOptional; visceralFatRating: z.ZodOptional; basalMetabolicRateKcal: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type BodyComposition = z.infer; //#endregion //#region src/domain/schemas/health/daily.d.ts /** * Zod schema for `extensions.health.daily` — a day-scoped wellness * summary covering steps, calories, and intensity minutes. * * Garmin FIT `file_type` values `monitoringA (15)`, `monitoringDaily (28)`, * and `monitoringB (32)` all map to this single sub-schema; consumers * that need to discriminate the source can do so via a future additive * field in a v2.x minor version. */ declare const dailyWellnessSchema: z.ZodObject<{ kind: z.ZodLiteral<"daily">; version: z.ZodString; date: z.ZodISODate; steps: z.ZodNumber; activeCalories: z.ZodNumber; restingCalories: z.ZodNumber; intensityMinutes: z.ZodObject<{ moderate: z.ZodNumber; vigorous: z.ZodNumber; }, z.core.$strip>; floorsClimbed: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type DailyWellness = z.infer; //#endregion //#region src/domain/schemas/health/energy-balance.d.ts /** * Provenance of a resolved day expenditure: `measured` from ingested device * calories, `predicted` from BMR + expected activity, or `mixed` when the day * blends both. */ declare const expenditureSourceSchema: z.ZodEnum<{ measured: "measured"; mixed: "mixed"; predicted: "predicted"; }>; type ExpenditureSource = z.infer; /** * Computed per-day energy-balance view-model — not a persisted payload but the * shape the SPA/chatbot read. * * `intake_kcal` is nullable: `null` means the day is untracked (never a silent * zero). `net_kcal` is correspondingly nullable — without a tracked intake * there is no net (never a misleading zero or full-surplus). `target_kcal` is * nullable when no goal is active. Macro targets and actuals are optional * because they only exist once a goal / intake is present. */ declare const dayEnergyBalanceSchema: z.ZodObject<{ date: z.ZodISODate; basal_kcal: z.ZodNumber; activity_kcal: z.ZodNumber; expenditure_kcal: z.ZodNumber; intake_kcal: z.ZodNullable; net_kcal: z.ZodNullable; target_kcal: z.ZodNullable; macro_targets: z.ZodOptional>; macro_actuals: z.ZodOptional>; source: z.ZodEnum<{ measured: "measured"; mixed: "mixed"; predicted: "predicted"; }>; }, z.core.$strip>; type DayEnergyBalance = z.infer; //#endregion //#region src/domain/schemas/health/energy-goal.d.ts /** * Body-composition objective driving the deficit/surplus engine. * * `fat_loss` and `muscle_gain` move weight toward `target_weight_kg`; * `maintain` holds it. Weights are strictly positive kilograms and * `target_date` is an ISO calendar date marking the planned horizon. */ declare const goalTypeSchema: z.ZodEnum<{ fat_loss: "fat_loss"; maintain: "maintain"; muscle_gain: "muscle_gain"; }>; type GoalType = z.infer; declare const energyGoalSchema: z.ZodObject<{ goal_type: z.ZodEnum<{ fat_loss: "fat_loss"; maintain: "maintain"; muscle_gain: "muscle_gain"; }>; start_weight_kg: z.ZodNumber; target_weight_kg: z.ZodNumber; target_date: z.ZodISODate; }, z.core.$strip>; type EnergyGoal = z.infer; //#endregion //#region src/domain/schemas/health/heart-rate-series.d.ts /** * 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. */ declare const heartRateSeriesSchema: z.ZodObject<{ kind: z.ZodLiteral<"heart-rate-series">; version: z.ZodString; startTime: z.ZodISODateTime; intervalSeconds: z.ZodNumber; samples: z.ZodArray>; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type HeartRateSeries = z.infer; //#endregion //#region src/domain/schemas/health/hrv.d.ts /** * Zod schema for `extensions.health.hrv` — a heart-rate-variability * summary captured either overnight (Garmin Body Battery / HRV Status) * or as a spot measurement. */ declare const hrvSummarySchema: z.ZodObject<{ kind: z.ZodLiteral<"hrv">; version: z.ZodString; measuredAt: z.ZodISODateTime; rMSSD: z.ZodNumber; measurementWindow: z.ZodEnum<{ overnight: "overnight"; spot: "spot"; }>; score: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type HrvSummary = z.infer; //#endregion //#region src/domain/schemas/health/nutrition.d.ts /** * Macro-nutrient value object: an energy total (`kcal`) plus its * protein/carbohydrate/fat breakdown in grams. * * Used both for logged intake actuals and for derived macro targets, so it * carries no `kind` discriminator and is not a health-extension payload — it * is a reusable building block embedded in higher-level energy view-models. */ declare const macroNutrientsSchema: z.ZodObject<{ kcal: z.ZodNumber; protein_g: z.ZodNumber; carb_g: z.ZodNumber; fat_g: z.ZodNumber; }, z.core.$strip>; type MacroNutrients = z.infer; /** * Time-of-day slot a manual intake entry belongs to. Optional context on an * entry; the four canonical slots cover the common logging cadence without a * free-form bucket. */ declare const mealSlotSchema: z.ZodEnum<{ breakfast: "breakfast"; dinner: "dinner"; lunch: "lunch"; snack: "snack"; }>; type MealSlot = z.infer; //#endregion //#region src/domain/schemas/health/sleep.d.ts /** * Zod schema for a single sleep stage within a sleep session. * * Stages cover a contiguous time slice with one of four canonical Garmin * sleep classifications. Adjacent stages do NOT have to be the same kind, * but their durations MUST sum to the parent session total within the * documented tolerance. */ declare const sleepStageSchema: z.ZodObject<{ stage: z.ZodEnum<{ awake: "awake"; deep: "deep"; light: "light"; rem: "rem"; }>; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>; type SleepStage = z.infer; /** * Zod schema for `extensions.health.sleep` — a single overnight sleep * session with REM/deep/light/awake stages, total duration, and optional * sleep score / resting heart rate. * * `version` is constrained to `2.x` so future additive evolution within * the v2 line is accepted without bumping the canonical KRD version. */ declare const sleepRecordSchema: z.ZodObject<{ kind: z.ZodLiteral<"sleep">; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; totalDurationSeconds: z.ZodNumber; stages: z.ZodArray; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>>; score: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type SleepRecord = z.infer; //#endregion //#region src/domain/schemas/health/strain.d.ts /** * Zod schema for `extensions.health.strain` — a read-only, source-agnostic * cardiovascular-load summary (e.g. WHOOP's 0–21 strain scale plus companion * day-level heart-rate and energy figures). Unlike the six FIT-core health * types it is not mandated to round-trip through FIT. * * A refinement requires `dayMaxHeartRate >= dayAverageHeartRate` when both * are present. */ declare const strainSummarySchema: z.ZodObject<{ kind: z.ZodLiteral<"strain">; version: z.ZodString; date: z.ZodISODate; strainScore: z.ZodNumber; dayAverageHeartRate: z.ZodOptional; dayMaxHeartRate: z.ZodOptional; energyKilojoules: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type StrainSummary = z.infer; //#endregion //#region src/domain/schemas/health/stress.d.ts /** * Zod schema for `extensions.health.stress` — a continuous stress episode * with an average and peak level over a time window (0–100 on Garmin's * device-side stress scale). */ declare const stressEpisodeSchema: z.ZodObject<{ kind: z.ZodLiteral<"stress">; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; averageLevel: z.ZodNumber; peakLevel: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type StressEpisode = z.infer; //#endregion //#region src/domain/schemas/health/tolerances.d.ts /** * Per-metric round-trip tolerances for the six health KRD types. * * Centralised so test suites import them rather than hardcoding values * per fixture. See the `health-data` capability spec for rationale. */ declare const SLEEP_STAGE_TOLERANCE_SECONDS = 60; declare const SLEEP_TOTAL_DURATION_TOLERANCE_SECONDS = 60; declare const WEIGHT_TOLERANCE_KG = 0.1; declare const HRV_TOLERANCE_MS = 1; declare const DAILY_STEPS_TOLERANCE = 0; declare const DAILY_KCAL_TOLERANCE = 1; declare const BODY_FAT_TOLERANCE_PERCENT = 0.1; declare const STRESS_TOLERANCE = 0; declare const STRAIN_SCORE_TOLERANCE = 0.1; declare const VITALS_RESPIRATORY_RATE_TOLERANCE = 0.1; declare const VITALS_SPO2_TOLERANCE = 0; declare const VITALS_RESTING_HEART_RATE_TOLERANCE = 0; declare const HEART_RATE_SERIES_BPM_TOLERANCE = 0; //#endregion //#region src/domain/schemas/health/vitals.d.ts /** * Zod schema for `extensions.health.vitals` — a read-only, source-agnostic * daily-vitals summary folding respiratory rate, SpO₂, skin temperature, and * resting heart rate into one payload. A refinement requires that at least * one measurement field be present so empty payloads are rejected. */ declare const vitalsSummarySchema: z.ZodObject<{ kind: z.ZodLiteral<"vitals">; version: z.ZodString; measuredAt: z.ZodISODateTime; respiratoryRate: z.ZodOptional; spo2Percent: z.ZodOptional; skinTempCelsius: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type VitalsSummary = z.infer; //#endregion //#region src/domain/schemas/health/weight.d.ts /** * Zod schema for `extensions.health.weight` — a scalar weight measurement * captured at a point in time. Body-composition fields (fat percent, lean * mass, water, BMI) live in the separate `body_composition` payload so * scales that only report scalar weight produce a valid payload without * partial fields. */ declare const weightMeasurementSchema: z.ZodObject<{ kind: z.ZodLiteral<"weight">; version: z.ZodString; measuredAt: z.ZodISODateTime; weightKilograms: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type WeightMeasurement = z.infer; //#endregion //#region src/domain/schemas/health/index.d.ts /** * Tagged discriminated union of the health-metric payloads carried under * `extensions.health.` in KRD v2.0: the six bidirectional FIT-core * types plus the read-only wearable-session metrics `strain`, `vitals`, and * `heart-rate-series`. * * The `kind` discriminator selects the variant; sub-schemas validate * their own per-metric invariants. */ declare const healthExtensionPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"sleep">; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; totalDurationSeconds: z.ZodNumber; stages: z.ZodArray; startTime: z.ZodISODateTime; durationSeconds: z.ZodNumber; }, z.core.$strip>>; score: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"weight">; version: z.ZodString; measuredAt: z.ZodISODateTime; weightKilograms: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"hrv">; version: z.ZodString; measuredAt: z.ZodISODateTime; rMSSD: z.ZodNumber; measurementWindow: z.ZodEnum<{ overnight: "overnight"; spot: "spot"; }>; score: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"daily">; version: z.ZodString; date: z.ZodISODate; steps: z.ZodNumber; activeCalories: z.ZodNumber; restingCalories: z.ZodNumber; intensityMinutes: z.ZodObject<{ moderate: z.ZodNumber; vigorous: z.ZodNumber; }, z.core.$strip>; floorsClimbed: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"bodyComposition">; version: z.ZodString; measuredAt: z.ZodISODateTime; bodyFatPercent: z.ZodOptional; leanMassKilograms: z.ZodOptional; boneMassKilograms: z.ZodOptional; bodyWaterPercent: z.ZodOptional; bmi: z.ZodOptional; visceralFatRating: z.ZodOptional; basalMetabolicRateKcal: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"stress">; version: z.ZodString; startTime: z.ZodISODateTime; endTime: z.ZodISODateTime; averageLevel: z.ZodNumber; peakLevel: z.ZodNumber; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"strain">; version: z.ZodString; date: z.ZodISODate; strainScore: z.ZodNumber; dayAverageHeartRate: z.ZodOptional; dayMaxHeartRate: z.ZodOptional; energyKilojoules: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"vitals">; version: z.ZodString; measuredAt: z.ZodISODateTime; respiratoryRate: z.ZodOptional; spo2Percent: z.ZodOptional; skinTempCelsius: z.ZodOptional; restingHeartRate: z.ZodOptional; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"heart-rate-series">; version: z.ZodString; startTime: z.ZodISODateTime; intervalSeconds: z.ZodNumber; samples: z.ZodArray>; kaiordRecordId: z.ZodOptional; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>], "kind">; type HealthExtensionPayload = z.infer; //#endregion //#region src/domain/type-guards.d.ts /** * Type guard to check if a workout step is a RepetitionBlock. * * Checks for both `repeatCount` and `steps` properties to reliably * discriminate between WorkoutStep and RepetitionBlock union members. */ declare const isRepetitionBlock: (step: WorkoutStep | RepetitionBlock) => step is RepetitionBlock; //#endregion //#region src/domain/types/error-types.d.ts /** * Validation error details for a specific field. * * Used by {@link KrdValidationError} to provide detailed information about validation failures. * * @example * ```typescript * const error: ValidationError = { * field: 'version', * message: 'Required field missing', * expected: 'string', * actual: undefined * }; * ``` */ type ValidationError = { /** The field path that failed validation */ field: string; /** Human-readable (English) error message */ message: string; /** * Stable, language-free machine code for the failure (e.g. `min_gt_max`, * `invalid_type`). Presentation layers localize by this code, never by * matching `message` text (see the `failure-semantics` spec). Absent when * the source issue carries no derivable code. */ code?: string; /** Optional expected value or type */ expected?: unknown; /** Optional actual value that failed validation */ actual?: unknown; }; /** * Tolerance violation details for a specific field. * * Used by {@link ToleranceExceededError} to provide detailed information about round-trip conversion errors. * * @example * ```typescript * const violation: ToleranceViolation = { * field: 'power', * expected: 250, * actual: 252, * deviation: 2, * tolerance: 1 * }; * ``` */ type ToleranceViolation = { /** The field that exceeded tolerance */ field: string; /** Expected value from original data */ expected: number; /** Actual value after round-trip conversion */ actual: number; /** Absolute deviation from expected value */ deviation: number; /** Maximum allowed tolerance */ tolerance: number; }; //#endregion //#region src/domain/types/shared-errors.d.ts /** * Base class for format-specific parsing errors (FIT, Garmin, TCX, Zwift). * * Subclasses only set their own `name`; the optional `cause` carries the * underlying failure and the offending constructor frame is trimmed from * the stack trace. */ declare abstract class FormatParsingError extends Error { readonly cause?: unknown; constructor(message: string, cause?: unknown); } /** * Base class for schema validation errors carrying an array of field-level * {@link ValidationError} details (KRD, TCX, ZWO). */ declare abstract class SchemaValidationError extends Error { readonly errors: Array; constructor(message: string, errors: Array); } //#endregion //#region src/domain/types/fit-errors.d.ts /** * Error thrown when FIT file parsing fails. * * This error is thrown by FIT readers when they encounter corrupted files, * invalid FIT data, or unsupported FIT features. * * @example * ```typescript * import { FitParsingError, convertFitToKrd } from '@kaiord/core'; * * try { * const krd = await convertFitToKrd(fitReader, validator, logger)({ * fitBuffer: corruptedBuffer * }); * } catch (error) { * if (error instanceof FitParsingError) { * console.error('FIT parsing failed:', error.message); * console.error('Cause:', error.cause); * } * } * ``` */ declare class FitParsingError extends FormatParsingError { readonly name = "FitParsingError"; } /** * Factory function to create a FitParsingError. * * Provides a functional programming style alternative to using `new FitParsingError()`. * * @param message - Error message describing the parsing failure * @param cause - Optional underlying error that caused the parsing failure * @returns A new FitParsingError instance * * @example * ```typescript * import { createFitParsingError } from '@kaiord/core'; * * throw createFitParsingError('Failed to parse FIT file', originalError); * ``` */ declare const createFitParsingError: (message: string, cause?: unknown) => FitParsingError; //#endregion //#region src/domain/types/garmin-errors.d.ts /** * Error thrown when Garmin Connect JSON parsing fails. */ declare class GarminParsingError extends FormatParsingError { readonly name = "GarminParsingError"; } declare const createGarminParsingError: (message: string, cause?: unknown) => GarminParsingError; //#endregion //#region src/domain/types/krd-errors.d.ts /** * Error thrown when KRD schema validation fails. * * This error is thrown when KRD data doesn't conform to the expected schema, * containing detailed validation errors for each field that failed validation. * * @example * ```typescript * import { KrdValidationError, krdSchema } from '@kaiord/core'; * * try { * const krd = krdSchema.parse(invalidData); * } catch (error) { * if (error instanceof KrdValidationError) { * console.error('KRD validation failed:', error.message); * error.errors.forEach(err => { * console.error(` ${err.field}: ${err.message}`); * }); * } * } * ``` */ declare class KrdValidationError extends SchemaValidationError { readonly name = "KrdValidationError"; } /** * Factory function to create a KrdValidationError. * * Provides a functional programming style alternative to using `new KrdValidationError()`. * * @param message - Error message describing the validation failure * @param errors - Array of validation errors with field-level details * @returns A new KrdValidationError instance * * @example * ```typescript * import { createKrdValidationError } from '@kaiord/core'; * * throw createKrdValidationError('KRD validation failed', [ * { field: 'version', message: 'Required field missing' }, * { field: 'type', message: 'Invalid value' } * ]); * ``` */ declare const createKrdValidationError: (message: string, errors: Array) => KrdValidationError; //#endregion //#region src/domain/types/service-errors.d.ts /** * Error thrown when authentication against a remote service fails. */ declare class ServiceAuthError extends Error { readonly cause?: unknown; readonly name = "ServiceAuthError"; constructor(message: string, cause?: unknown); } declare const createServiceAuthError: (message: string, cause?: unknown) => ServiceAuthError; /** * Error thrown when a remote service API request fails. */ declare class ServiceApiError extends Error { readonly statusCode?: number | undefined; readonly cause?: unknown; readonly name = "ServiceApiError"; constructor(message: string, statusCode?: number | undefined, cause?: unknown); } declare const createServiceApiError: (message: string, statusCode?: number, cause?: unknown) => ServiceApiError; //#endregion //#region src/domain/types/tcx-errors.d.ts /** * Error thrown when TCX file parsing fails. * * This error is thrown by TCX readers when they encounter invalid XML, * malformed TCX data, or unsupported TCX features. * * @example * ```typescript * import { TcxParsingError, convertTcxToKrd } from '@kaiord/core'; * * try { * const krd = await convertTcxToKrd(tcxReader, validator, logger)({ * tcxString: invalidXml * }); * } catch (error) { * if (error instanceof TcxParsingError) { * console.error('TCX parsing failed:', error.message); * } * } * ``` */ declare class TcxParsingError extends FormatParsingError { readonly name = "TcxParsingError"; } /** * Factory function to create a TcxParsingError. * * @param message - Error message describing the parsing failure * @param cause - Optional underlying error that caused the parsing failure * @returns A new TcxParsingError instance */ declare const createTcxParsingError: (message: string, cause?: unknown) => TcxParsingError; /** * Error thrown when TCX schema validation fails. * * This error is thrown when TCX data doesn't conform to the expected schema. * * @example * ```typescript * import { TcxValidationError } from '@kaiord/core'; * * try { * // validation code * } catch (error) { * if (error instanceof TcxValidationError) { * error.errors.forEach(err => { * console.error(`${err.field}: ${err.message}`); * }); * } * } * ``` */ declare class TcxValidationError extends SchemaValidationError { readonly name = "TcxValidationError"; } /** * Factory function to create a TcxValidationError. * * @param message - Error message describing the validation failure * @param errors - Array of validation errors with field-level details * @returns A new TcxValidationError instance */ declare const createTcxValidationError: (message: string, errors: Array) => TcxValidationError; //#endregion //#region src/domain/types/tolerance-errors.d.ts /** * Error thrown when round-trip conversion exceeds tolerance thresholds. * * This error is thrown by the tolerance checker when converting between formats * results in data loss or precision errors beyond acceptable tolerances. * * @example * ```typescript * import { ToleranceExceededError, validateRoundTrip } from '@kaiord/core'; * * try { * await validateRoundTrip(checker, fitReader, fitWriter, logger)({ * krd: originalKrd * }); * } catch (error) { * if (error instanceof ToleranceExceededError) { * console.error('Round-trip tolerance exceeded:', error.message); * error.violations.forEach(v => { * console.error(` ${v.field}: expected ${v.expected}, got ${v.actual}`); * console.error(` deviation: ${v.deviation}, tolerance: ${v.tolerance}`); * }); * } * } * ``` */ declare class ToleranceExceededError extends Error { readonly violations: Array; readonly name = "ToleranceExceededError"; constructor(message: string, violations: Array); } //#endregion //#region src/domain/types/unsupported-krd-type-error.d.ts /** * Error thrown by a workout-only format adapter (TCX, ZWO, GCN) when * asked to write a KRD whose `type` is one of the health variants * introduced in KRD v2.0 (`sleep_record`, `weight_measurement`, * `hrv_summary`, `daily_wellness`, `body_composition`, `stress_episode`). * * This typed error replaces the generic `throw new Error(...)` previously * used for unsupported types and lets callers (e.g., the SPA import flow) * `instanceof`-check it to route the offending KRD to the FIT pipeline * instead. * * @example * ```typescript * import { UnsupportedKrdTypeError } from '@kaiord/core'; * * try { * await tcxWriter(sleepKrd); * } catch (error) { * if (error instanceof UnsupportedKrdTypeError) { * console.log(`${error.adapterName} cannot write ${error.krdType}`); * } * } * ``` */ declare class UnsupportedKrdTypeError extends Error { readonly krdType: FileType; readonly adapterName: string; readonly name = "UnsupportedKrdTypeError"; constructor(krdType: FileType, adapterName: string); } /** * Factory function to create an UnsupportedKrdTypeError. * * @param krdType - The offending `krd.type` value. * @param adapterName - The name of the rejecting adapter (e.g. "tcx"). */ declare const createUnsupportedKrdTypeError: (krdType: FileType, adapterName: string) => UnsupportedKrdTypeError; //#endregion //#region src/domain/types/zwift-errors.d.ts /** * Error thrown when Zwift workout file parsing fails. * * This error is thrown by Zwift readers when they encounter invalid XML, * malformed ZWO data, or unsupported Zwift features. * * @example * ```typescript * import { ZwiftParsingError, convertZwiftToKrd } from '@kaiord/core'; * * try { * const krd = await convertZwiftToKrd(zwiftReader, validator, logger)({ * zwiftString: invalidXml * }); * } catch (error) { * if (error instanceof ZwiftParsingError) { * console.error('Zwift parsing failed:', error.message); * } * } * ``` */ declare class ZwiftParsingError extends FormatParsingError { readonly name = "ZwiftParsingError"; } /** * Factory function to create a ZwiftParsingError. * * @param message - Error message describing the parsing failure * @param cause - Optional underlying error that caused the parsing failure * @returns A new ZwiftParsingError instance */ declare const createZwiftParsingError: (message: string, cause?: unknown) => ZwiftParsingError; /** * Error thrown when Zwift schema validation fails. * * This error is thrown when Zwift data doesn't conform to the expected schema. * * @example * ```typescript * import { ZwiftValidationError } from '@kaiord/core'; * * try { * // validation code * } catch (error) { * if (error instanceof ZwiftValidationError) { * error.errors.forEach(err => { * console.error(`${err.field}: ${err.message}`); * }); * } * } * ``` */ declare class ZwiftValidationError extends SchemaValidationError { readonly name = "ZwiftValidationError"; } /** * Factory function to create a ZwiftValidationError. * * @param message - Error message describing the validation failure * @param errors - Array of validation errors with field-level details * @returns A new ZwiftValidationError instance */ declare const createZwiftValidationError: (message: string, errors: Array) => ZwiftValidationError; //#endregion //#region src/domain/validation/extract-workout.d.ts /** * Extracts and validates the structured workout from a KRD object. * * Checks that the KRD type is "structured_workout" and validates * the workout in extensions.structured_workout against workoutSchema. * * @param krd - KRD object to extract workout from * @returns Validated Workout object * @throws {KrdValidationError} If KRD is not a structured workout or workout is invalid */ declare const extractWorkout: (krd: KRD) => Workout; //#endregion //#region src/domain/validation/schema-validator.d.ts type SchemaValidator = { validate: (krd: unknown) => Array; }; declare const createSchemaValidator: () => SchemaValidator; //#endregion //#region src/domain/validation/tolerance-checker.d.ts declare const toleranceConfigSchema: z.ZodObject<{ timeTolerance: z.ZodNumber; distanceTolerance: z.ZodNumber; powerTolerance: z.ZodNumber; ftpTolerance: z.ZodNumber; hrTolerance: z.ZodNumber; cadenceTolerance: z.ZodNumber; paceTolerance: z.ZodNumber; }, z.core.$strip>; type ToleranceConfig = z.infer; declare const DEFAULT_TOLERANCES: ToleranceConfig; declare const toleranceViolationSchema: z.ZodObject<{ field: z.ZodString; expected: z.ZodNumber; actual: z.ZodNumber; deviation: z.ZodNumber; tolerance: z.ZodNumber; }, z.core.$strip>; type ToleranceViolation$1 = z.infer; type ToleranceChecker = { checkTime: (expected: number, actual: number) => ToleranceViolation$1 | null; checkDistance: (expected: number, actual: number) => ToleranceViolation$1 | null; checkPower: (expected: number, actual: number) => ToleranceViolation$1 | null; checkHeartRate: (expected: number, actual: number) => ToleranceViolation$1 | null; checkCadence: (expected: number, actual: number) => ToleranceViolation$1 | null; checkPace: (expected: number, actual: number) => ToleranceViolation$1 | null; }; declare const createToleranceChecker: (config?: ToleranceConfig) => ToleranceChecker; //#endregion //#region src/domain/validation/validate-krd.d.ts /** * Validates unknown data against the KRD schema. * * @param krd - Data to validate * @returns Validated and parsed KRD object (via Zod's result.data) * @throws {KrdValidationError} When validation fails */ declare const validateKrd: (krd: unknown) => KRD; //#endregion //#region src/domain/zones/power-zones.d.ts /** * Coggan 7-band power-zone-to-percent-FTP table. * * Single source of truth for translating a discrete cycling power zone * (1..7) into the percent-of-FTP value the zone represents. Lives in the * domain layer because the mapping is a fitness-domain truth (Coggan * power-zone definitions), not a format encoding. * * Zone 1 (Recovery): 55% FTP * Zone 2 (Endurance): 75% FTP * Zone 3 (Tempo): 90% FTP * Zone 4 (Threshold): 105% FTP * Zone 5 (VO2 Max): 120% FTP * Zone 6 (Anaerobic): 150% FTP * Zone 7 (Neuromuscular): 200% FTP */ type PowerZone = 1 | 2 | 3 | 4 | 5 | 6 | 7; declare const POWER_ZONES: readonly PowerZone[]; declare const POWER_ZONE_PERCENT_FTP: Readonly>; /** * Type guard: narrows `number` to `PowerZone` when value is an integer in [1, 7]. */ declare const isPowerZone: (value: number) => value is PowerZone; /** * Map a Coggan power zone (1..7) to its percent-FTP value. * * @throws RangeError when `zone` is not an integer in the closed interval [1, 7]. * The contract is strict: `0`, `8`, `-1`, `NaN`, `Infinity`, and * non-integers like `1.5` are all rejected. The helper MUST NOT * return `undefined`, `null`, or a silently clamped value. */ declare const zoneToPercentFtp: (zone: number) => number; /** * Inverse of `zoneToPercentFtp`: map a percent-FTP value back to the zone * whose canonical percent equals it exactly. * * Round-trip identity: `percentFtpToZone(zoneToPercentFtp(z)) === z` for * every `z` in [1, 7]. * * @throws RangeError when `percent` does not exactly match any of the seven * canonical band values (55, 75, 90, 105, 120, 150, 200). This * function is intentionally a discrete inverse, not a nearest-band * classifier — adapters that need fuzzy classification should layer * that policy on top. */ declare const percentFtpToZone: (percent: number) => PowerZone; //#endregion //#region src/ports/analytics.d.ts type AnalyticsEvent = Record; type Analytics = { pageView: (path: string) => void; event: (name: string, props?: AnalyticsEvent) => void; }; //#endregion //#region src/adapters/analytics/noop-analytics.d.ts declare const createNoopAnalytics: () => Analytics; //#endregion //#region src/ports/logger.d.ts type LogLevel = "debug" | "info" | "warn" | "error"; type Logger = { debug: (message: string, context?: Record) => void; info: (message: string, context?: Record) => void; warn: (message: string, context?: Record) => void; error: (message: string, context?: Record) => void; }; //#endregion //#region src/adapters/logger/console-logger.d.ts declare const createConsoleLogger: () => Logger; //#endregion //#region src/ports/auth-provider.d.ts /** * Opaque token data for session persistence. */ type TokenData = Record; /** * Port for authentication against a remote service. */ type AuthProvider = { login: (username: string, password: string) => Promise; is_authenticated: () => boolean; export_tokens: () => Promise; restore_tokens: (tokens: TokenData) => Promise; logout: () => Promise; }; //#endregion //#region src/ports/format-strategy.d.ts /** * Reads binary data (e.g. FIT) and converts it to KRD. */ type BinaryReader = (buffer: Uint8Array) => Promise; /** * Reads text data (e.g. TCX, ZWO, GPX) and converts it to KRD. */ type TextReader = (text: string) => Promise; /** * Converts KRD to binary output (e.g. FIT). */ type BinaryWriter = (krd: KRD) => Promise; /** * Converts KRD to text output (e.g. TCX, ZWO, GPX). */ type TextWriter = (krd: KRD) => Promise; //#endregion //#region src/ports/token-store.d.ts /** * Port for persisting authentication tokens between sessions. */ type TokenStore = { save: (tokens: TokenData) => Promise; load: () => Promise; clear: () => Promise; }; //#endregion //#region src/ports/workout-service.d.ts /** * Summary of a remote workout (listing view). */ type WorkoutSummary = { id: string; name: string; sport: string; created_at: string; updated_at: string; }; /** * Result of pushing a workout to a remote service. */ type PushResult = { id: string; name: string; url?: string; }; /** * Options for listing workouts. */ type ListOptions = { offset?: number; limit?: number; }; /** * Port for a remote workout service (push/pull/list/delete). */ type WorkoutService = { push: (krd: KRD) => Promise; pull: (workoutId: string) => Promise; list: (options?: ListOptions) => Promise; remove: (workoutId: string) => Promise; }; //#endregion //#region src/application/from-format.d.ts /** * Converts binary format data to KRD with validation. * * @example * ```typescript * import { fromBinary } from '@kaiord/core'; * import { fitReader } from '@kaiord/fit'; * * const krd = await fromBinary(buffer, fitReader); * ``` */ declare const fromBinary: (buffer: Uint8Array, reader: BinaryReader, logger?: Logger) => Promise; /** * Converts text format data to KRD with validation. * * @example * ```typescript * import { fromText } from '@kaiord/core'; * import { tcxReader } from '@kaiord/tcx'; * * const krd = await fromText(xmlString, tcxReader); * ``` */ declare const fromText: (text: string, reader: TextReader, logger?: Logger) => Promise; //#endregion //#region src/application/to-format.d.ts /** * Converts KRD to binary format with validation. * * @example * ```typescript * import { toBinary } from '@kaiord/core'; * import { fitWriter } from '@kaiord/fit'; * * const buffer = await toBinary(krd, fitWriter); * ``` */ declare const toBinary: (krd: KRD, writer: BinaryWriter, logger?: Logger) => Promise; /** * Converts KRD to text format with validation. * * @example * ```typescript * import { toText } from '@kaiord/core'; * import { tcxWriter } from '@kaiord/tcx'; * * const xml = await toText(krd, tcxWriter); * ``` */ declare const toText: (krd: KRD, writer: TextWriter, logger?: Logger) => Promise; //#endregion //#region src/application/energy/activity-factor.d.ts /** * Activity-level NEAT factors applied to the predicted basal expenditure. * * These multipliers are deliberately LOWER than the classic TDEE activity * multipliers (which run ~1.2–1.9). The predicted expenditure already adds * scheduled-workout energy separately via `expectedActivityKcal`, so the factor * here only covers Non-Exercise Activity Thermogenesis (NEAT) — daily movement, * posture, fidgeting, occupational activity — NOT structured exercise. Using a * full TDEE multiplier would double-count the workout kcal. * * The default (unset activity level) is `sedentary` (1.2), the most conservative * assumption, so an incomplete profile never over-states maintenance. */ type ActivityLevel = "sedentary" | "light" | "moderate" | "active" | "very_active"; /** NEAT factor used when the profile has no `activityLevel` set. */ declare const DEFAULT_NEAT_FACTOR = 1.2; /** NEAT-only multipliers per activity level (workout kcal added separately). */ declare const NEAT_FACTOR: Record; /** * Resolve the NEAT multiplier for an activity level, falling back to * `DEFAULT_NEAT_FACTOR` when the level is unset (`undefined`/`null`). */ declare const neatFactorForActivityLevel: (level?: ActivityLevel | null) => number; //#endregion //#region src/application/energy/adaptive-tdee.d.ts /** * Adaptive TDEE (maintenance) back-calculation. Pure; no adapter/external deps. * * Once enough paired intake + weight history exists, real maintenance energy is * recovered from the observed smoothed weight change versus the average logged * intake over a rolling window, rather than the modeled BMR + activity estimate. * * Energy-balance identity (fat-mass basis): * weightChangeKg = (avgDailyIntakeKcal − maintenanceKcal) · windowDays * / KCAL_PER_KG_FAT * Solving for maintenance: * maintenanceKcal = avgDailyIntakeKcal * − (weightChangeKg · KCAL_PER_KG_FAT / windowDays) * * A weight DROP (negative `weightChangeKg`) at a given intake implies * maintenance ABOVE intake; a weight GAIN implies maintenance below intake. * * The result is always flagged `isEstimate: true`. `sufficientData` is false * (and the modeled maintenance should stay in use) until at least * `MIN_ADAPTIVE_DAYS` of paired data back the window. */ /** Energy density of body fat (kcal per kg) used for the balance identity. */ declare const KCAL_PER_KG_FAT = 7700; /** Minimum paired-history days before adaptive maintenance activates. */ declare const MIN_ADAPTIVE_DAYS = 14; type ComputeAdaptiveTdeeInput = { /** Average logged daily intake (kcal) over the window. */ avgDailyIntakeKcal: number; /** Smoothed weight change over the window (kg; negative = loss). */ weightChangeKg: number; /** Calendar span of the window (days); the rate denominator. */ windowDays: number; /** Days with usable paired data; gates `sufficientData`. */ daysWithData: number; }; type AdaptiveTdeeResult = { /** Back-calculated maintenance energy (kcal/day). Always an estimate. */ maintenanceKcal: number; /** Always true: the value is inferred from observed history, not modeled. */ isEstimate: true; /** True once `daysWithData >= MIN_ADAPTIVE_DAYS` and the window is valid. */ sufficientData: boolean; }; /** * Back-calculate adaptive maintenance from average intake versus the smoothed * weight change over a window. * * @throws RangeError when intake/weight are non-finite or `windowDays` <= 0. */ declare const computeAdaptiveTdee: (input: ComputeAdaptiveTdeeInput) => AdaptiveTdeeResult; //#endregion //#region src/application/energy/aggregate-energy-balance.d.ts type EnergyBalanceRollup = { totalExpenditureKcal: number; totalIntakeKcal: number; totalNetKcal: number; avgExpenditureKcal: number; avgIntakeKcal: number | null; daysTracked: number; dayCount: number; }; /** * Roll up a range of `DayEnergyBalance` days into totals and averages. An empty * range yields zeroed totals with `avgIntakeKcal` of `null`. */ declare const aggregateEnergyBalance: (days: ReadonlyArray) => EnergyBalanceRollup; //#endregion //#region src/application/energy/bmr.d.ts /** * Basal-metabolic-rate estimation. Pure functions, no adapter/external deps. * * Mifflin-St Jeor is the default; Katch-McArdle is used when a body-fat * fraction is known, since lean-mass-based BMR is more accurate. The chosen * formula is returned so callers (UI/chatbot) can explain the number. */ type BmrFormula = "mifflin-st-jeor" | "katch-mcardle"; type Sex = "male" | "female"; type BmrInput = { weightKg: number; heightCm: number; age: number; sex: Sex; /** Body-fat as a fraction in [0, 1); enables Katch-McArdle. */ bodyFatFraction?: number; }; type BmrResult = { kcal: number; formula: BmrFormula; }; /** * Estimate BMR (kcal/day). Uses Katch-McArdle when `bodyFatFraction` is a * valid [0, 1) fraction, otherwise Mifflin-St Jeor. * * @throws RangeError when weight, height, or age is not positive and finite. */ declare const computeBmr: (input: BmrInput) => BmrResult; //#endregion //#region src/application/energy/day-balance.d.ts /** The expenditure portion already resolved by `resolveDayExpenditure`. */ type ResolvedExpenditure = { basalKcal: number; activityKcal: number; expenditureKcal: number; source: ExpenditureSource; }; type AssembleDayEnergyBalanceInput = { /** ISO date (YYYY-MM-DD) the balance covers. */ date: string; /** Resolved expenditure (`{ basalKcal, activityKcal, expenditureKcal, source }`). */ expenditure: ResolvedExpenditure; /** Logged intake kcal; `null` means the day is untracked. */ intakeKcal: number | null; /** Active goal target kcal; `null` when no goal is active. */ targetKcal: number | null; /** Optional derived macro targets (present once a goal is active). */ macroTargets?: MacroNutrients; /** Optional logged macro actuals (present once intake is tracked). */ macroActuals?: MacroNutrients; }; /** * Assemble a validated `DayEnergyBalance` from a resolved expenditure plus the * day's intake, target, and optional macro breakdowns. * * @throws ZodError when the assembled view-model fails schema validation. */ declare const assembleDayEnergyBalance: (input: AssembleDayEnergyBalanceInput) => DayEnergyBalance; //#endregion //#region src/application/energy/ema.d.ts /** * Exponential moving average (EMA) over a dated numeric series. Pure; no * adapter/external deps. * * Used to smooth noisy daily weigh-ins into a trend line (and reusable for any * other dated signal). Points MUST be ascending by date; the returned series * mirrors the input one-to-one, each entry carrying the running EMA up to and * including that point. * * Alpha derivation: a `windowDays` span maps to the standard smoothing factor * alpha = 2 / (windowDays + 1) * the same relation used for an N-period EMA. A larger window yields a smaller * alpha and therefore a heavier, slower-moving trend. The first point seeds the * EMA with its own value (ema[0] = value[0]); each subsequent point updates it * as `ema = alpha * value + (1 - alpha) * prevEma`. * * Guards: empty input returns `[]`; a non-finite `windowDays` (≤ 0) or any * non-finite point value throws a RangeError rather than propagating NaN. */ type EmaPoint = { /** ISO date (YYYY-MM-DD); the series MUST be ascending by date. */ date: string; value: number; }; type EmaOptions = { /** Smoothing window in days; alpha = 2 / (windowDays + 1). Must be > 0. */ windowDays: number; }; type EmaResult = { date: string; ema: number; }; /** * Compute the running EMA of a dated series (ascending by date). Returns a * same-length series of `{ date, ema }`; the first ema equals the first value. * * @throws RangeError when `windowDays` is not positive and finite, or when any * point value is non-finite. */ declare const exponentialMovingAverage: (points: ReadonlyArray, options: EmaOptions) => EmaResult[]; //#endregion //#region src/application/energy/expected-activity-kcal.d.ts type ExpectedActivityKcalInput = { sport: Sport; durationSec: number; weightKg: number; avgPowerWatts?: number; distanceKm?: number; }; /** * Estimate a planned workout's activity kcal via the first applicable tier * (power → running-distance → MET). Result is rounded to integer kcal. * * @throws RangeError when required inputs are not positive and finite, or when * an optional input is present but not non-negative and finite. */ declare const estimateExpectedActivityKcal: (input: ExpectedActivityKcalInput) => number; //#endregion //#region src/application/energy/expenditure.d.ts /** Ingested device calories for a day, when a connection covers it. */ type MeasuredWellness = { activeCalories: number; restingCalories: number; }; type DayExpenditureInput = { /** Present only when device wellness covers the day. */ measured?: MeasuredWellness; /** Basal metabolic rate (kcal/day) for the predicted fallback. */ bmrKcal: number; /** Estimated activity kcal for the predicted fallback (Phase 4 input). */ expectedActivityKcal: number; /** * NEAT multiplier applied to BMR for the predicted basal; defaults to 1. * The measured path ignores it. */ basalActivityFactor?: number; }; type DayExpenditureResult = { basalKcal: number; activityKcal: number; expenditureKcal: number; source: ExpenditureSource; }; /** * Resolve a day's total energy expenditure, preferring measured device data * over the predicted BMR + expected-activity model. */ declare const resolveDayExpenditure: (input: DayExpenditureInput) => DayExpenditureResult; //#endregion //#region src/application/energy/goal-cap.d.ts /** * Safety-cap resolution for the daily goal delta. Pure; no external deps. * * A cap either binds (clamp the delta to the safe value) or is overridden (the * user accepted an unsafe pace, so the raw delta is used). In both bound cases * `capped`/`capReason` stay set so the UI keeps its warning. */ type ComputeDailyDeltaResult = { dailyDeltaKcal: number; capped: boolean; capReason: string | null; /** True when a cap would have bound but the user overrode it. */ overridden: boolean; }; //#endregion //#region src/application/energy/goal-delta.d.ts /** Hard lower bound on planned daily intake (kcal); never go below. */ declare const FLOOR_KCAL = 1200; /** Conservative muscle-gain surplus cap (kcal/day, ~0.5 kg/month). */ declare const MUSCLE_SURPLUS_CAP = 400; type ComputeDailyDeltaInput = { goalType: GoalType; currentWeightKg: number; targetWeightKg: number; /** ISO date (YYYY-MM-DD) for the planned horizon. */ targetDate: string; /** ISO date (YYYY-MM-DD) for "now". */ today: string; maintenanceKcal: number; /** * When true and a safety cap would bind, return the raw (unclamped) delta * while still reporting `capped`/`capReason` so callers keep the warning. */ overrideCap?: boolean; }; /** * Compute the daily calorie delta (signed) for a goal, applying safety caps. * * @throws RangeError when weights/maintenance are not positive and finite or a * date is not parseable. */ declare const computeDailyDelta: (input: ComputeDailyDeltaInput) => ComputeDailyDeltaResult; //#endregion //#region src/application/energy/macro-targets.d.ts type ComputeMacroTargetsInput = { targetKcal: number; weightKg: number; goalType: GoalType; }; /** * Derive protein/carb/fat gram targets from a calorie target and bodyweight. * * @throws RangeError when `targetKcal` or `weightKg` is not positive and finite. */ declare const computeMacroTargets: (input: ComputeMacroTargetsInput) => MacroNutrients; //#endregion //#region src/application/energy/met-table.d.ts /** Fallback MET for any `Sport` not present in {@link MET_TABLE}. */ declare const DEFAULT_MET = 6; /** * Standard MET values per sport. Partial by design: unmapped sports resolve to * {@link DEFAULT_MET}. Extend by adding the sport key with its reference MET. */ declare const MET_TABLE: Partial>; /** * Resolve a sport's MET value, falling back to {@link DEFAULT_MET} for any * sport absent from {@link MET_TABLE}. */ declare const metForSport: (sport: Sport) => number; //#endregion //#region src/application/energy/periodized-target.d.ts /** * Per-day calorie target assembly. Pure; no adapter/external deps. * * The target is the day's modeled expenditure plus the goal's signed daily * delta, floored so it never drops below a safe minimum: * targetKcal = max(floor, bmrKcal + expectedActivityKcal + dailyDeltaKcal) * * `expectedActivityKcal` is the periodization hook: per-day workout estimates * arrive in Phase 4 and will vary the target day-to-day. Until then callers * pass 0, which yields a flat target across the horizon — that is expected and * not a bug. */ type ComputePeriodizedTargetInput = { bmrKcal: number; /** Per-day expected activity kcal; 0 until Phase 4 wires per-day estimates. */ expectedActivityKcal: number; /** Signed daily delta from `computeDailyDelta` (negative = deficit). */ dailyDeltaKcal: number; /** Lower bound on the target; defaults to FLOOR_KCAL. */ floorKcal?: number; }; /** * Resolve the floored per-day calorie target from modeled expenditure plus the * goal's signed daily delta. * * @throws RangeError when any kcal input is not finite. */ declare const computePeriodizedTarget: (input: ComputePeriodizedTargetInput) => number; //#endregion //#region src/application/round-trip/validate-round-trip.d.ts /** * TypeScript type for the validateRoundTrip use case function. * * Automatically inferred from the {@link validateRoundTrip} factory function. */ type ValidateRoundTrip = ReturnType; /** * Validates round-trip conversion between a binary format and KRD. * * Format-agnostic in mechanism: it depends only on the injected * `BinaryReader`/`BinaryWriter` ports, so it validates any binary adapter * (FIT today). It exposes `validateBinaryRoundTrip` (binary → KRD → binary) * and `validateKrdRoundTrip` (KRD → binary → KRD), each returning the * tolerance violations found. Default tolerances: time ±1 s, power ±1 W or * ±1% FTP, heart rate ±1 bpm, cadence ±1 rpm. * * @param binaryReader - binary-format reader implementation * @param binaryWriter - binary-format writer implementation * @param toleranceChecker - tolerance checker with configured thresholds * @param logger - logger for operation tracking */ declare const validateRoundTrip: (binaryReader: BinaryReader, binaryWriter: BinaryWriter, toleranceChecker: ToleranceChecker, logger: Logger) => { validateBinaryRoundTrip: (params: { originalBinary: Uint8Array; }) => Promise>; validateKrdRoundTrip: (params: { originalKrd: KRD; }) => Promise>; /** @deprecated Use {@link validateBinaryRoundTrip}; the reader/writer are format-agnostic binary ports, not FIT-specific. */ validateFitToKrdToFit: (params: { originalFit: Uint8Array; }) => Promise<{ field: string; expected: number; actual: number; deviation: number; tolerance: number; }[]>; /** @deprecated Use {@link validateKrdRoundTrip}. */ validateKrdToFitToKrd: (params: { originalKrd: KRD; }) => Promise<{ field: string; expected: number; actual: number; deviation: number; tolerance: number; }[]>; }; //#endregion //#region src/protocol/profile-snapshot.d.ts declare const profileSnapshotSchema: z.ZodPipe; profile: z.ZodObject<{ name: z.ZodString; bodyWeight: z.ZodOptional; }, z.core.$strict>; activeSport: z.ZodOptional>; thresholds: z.ZodDefault; }, z.core.$strict>>; running: z.ZodOptional; lthr: z.ZodOptional; }, z.core.$strict>>; swimming: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>; heartRate: z.ZodDefault; lthr: z.ZodOptional; }, z.core.$strict>>; generatedAt: z.ZodISODateTime; }, z.core.$strict>>; type ProfileSnapshot = z.infer; /** * Days after which a cached snapshot is considered stale and the popup * SHALL render the placeholder instead of the cached athlete card. * * Rationale: a training-week cadence; revisit if telemetry from * registered bridges suggests otherwise. */ declare const STALE_SNAPSHOT_THRESHOLD_DAYS = 7; declare const fingerprintSnapshot: (profileId: string, snapshot: ProfileSnapshot) => string; //#endregion //#region src/domain/lab/lab-flag.d.ts /** Out-of-range flag for a measured value, always evaluated in canonical unit. */ declare const labFlagSchema: z.ZodEnum<{ high: "high"; in: "in"; low: "low"; unknown: "unknown"; }>; type LabFlag = z.infer; type BiologicalSex = "male" | "female"; type Bounds$1 = { low?: number; high?: number; }; /** Canonical catalog fallback range for a parameter, optionally sex-aware. */ type CatalogFallback = Bounds$1 & { bySex?: { male: Bounds$1; female: Bounds$1; }; }; type ComputeFlagInput = { valueCanonical: number; refLowCanonical?: number; refHighCanonical?: number; refText?: string; catalogFallback?: CatalogFallback; sex?: BiologicalSex; }; /** * Classify a canonical value against the effective reference range. * Priority: report canonical bounds > report `refText` > catalog fallback * (sex-aware when `refBySex` and `sex` are present) > `"unknown"`. A `refText` * that does not parse to numeric bounds yields `"unknown"` (not highlighted). */ declare function computeFlag(input: ComputeFlagInput): LabFlag; //#endregion //#region src/domain/lab/lab-parameter.d.ts /** Reference-range bounds expressed in a parameter's canonical unit. */ declare const labRefRangeSchema: z.ZodObject<{ low: z.ZodOptional; high: z.ZodOptional; }, z.core.$strip>; type LabRefRange = z.infer; /** A unit convertible to the canonical unit by an affine transform. */ declare const knownUnitSchema: z.ZodObject<{ unit: z.ZodString; factorToCanonical: z.ZodNumber; offsetToCanonical: z.ZodOptional; }, z.core.$strip>; type KnownUnit = z.infer; /** Panel/group a core parameter belongs to. */ declare const labPanelSchema: z.ZodEnum<{ biochemistry: "biochemistry"; hemogram: "hemogram"; hepatic: "hepatic"; hormones: "hormones"; ions: "ions"; iron: "iron"; lipids: "lipids"; sports: "sports"; thyroid: "thyroid"; vitamins: "vitamins"; }>; type LabPanel = z.infer; /** Static reference-data descriptor for a core lab parameter. */ declare const labParameterSchema: z.ZodObject<{ key: z.ZodString; canonicalUnit: z.ZodString; knownUnits: z.ZodOptional; }, z.core.$strip>>>; canonicalRefLow: z.ZodOptional; canonicalRefHigh: z.ZodOptional; refBySex: z.ZodOptional; high: z.ZodOptional; }, z.core.$strip>; female: z.ZodObject<{ low: z.ZodOptional; high: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>>; panel: z.ZodEnum<{ biochemistry: "biochemistry"; hemogram: "hemogram"; hepatic: "hepatic"; hormones: "hormones"; ions: "ions"; iron: "iron"; lipids: "lipids"; sports: "sports"; thyroid: "thyroid"; vitamins: "vitamins"; }>; loinc: z.ZodOptional; }, z.core.$strip>; type LabParameter = z.infer; //#endregion //#region src/domain/lab/lab-parameter-catalog.d.ts /** * Immutable reference catalog of the core lab parameters. Ranges and factors * are orientative fallbacks — the user's report range is the authority. The * long tail is modelled with free `custom:` parameters (no conversion, * no fallback range) rather than extending this list. */ declare const LAB_PARAMETER_CATALOG: readonly LabParameter[]; /** Look up a core parameter by its canonical key. */ declare function getLabParameter(key: string): LabParameter | undefined; declare const CUSTOM_PARAMETER_PREFIX = "custom:"; /** Build a free-parameter key for the long tail (`custom:`). */ declare function customParameterKey(slug: string): string; /** Whether a parameter key denotes a free (custom) parameter. */ declare function isCustomParameterKey(key: string): boolean; //#endregion //#region src/domain/lab/lab-provenance.d.ts /** * Write provenance for lab records. The `sourceBridgeId` + `externalId` * columns mirror the health-record provenance shape so a future promotion * of labs into the Data Hub (a real labs bridge in V2+) is additive rather * than a migration. V1 always writes `source: "manual"`. */ declare const labProvenanceSchema: z.ZodObject<{ source: z.ZodEnum<{ "ai-extracted": "ai-extracted"; manual: "manual"; whoop: "whoop"; }>; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; type LabProvenance = z.infer; //#endregion //#region src/domain/lab/lab-report.d.ts /** * A lab report — one dated analysis (draw) that groups N `LabValue` * measurements. Flat shape (direct fields, no `krd` wrapper) following the * `activity` principle of an own shape over generic infrastructure. Context * fields (fasting / drawTime / notes) are optional per-report annotations. */ declare const labReportSchema: z.ZodObject<{ id: z.ZodString; profileId: z.ZodString; date: z.ZodISODate; labName: z.ZodOptional; fasting: z.ZodOptional; drawTime: z.ZodOptional; notes: z.ZodOptional; provenance: z.ZodObject<{ source: z.ZodEnum<{ "ai-extracted": "ai-extracted"; manual: "manual"; whoop: "whoop"; }>; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; type LabReport = z.infer; //#endregion //#region src/domain/lab/lab-value.d.ts /** Where the effective reference range came from. */ declare const labRefSourceSchema: z.ZodEnum<{ catalog: "catalog"; none: "none"; report: "report"; }>; type LabRefSource = z.infer; /** * A single measured parameter belonging to a `LabReport`. `date` and * `profileId` are denormalized from the report so the per-parameter series * and the latest-per-parameter query are served straight from `labValues`. * Values and reference bounds are stored both as entered (`*Raw`) and in the * parameter's canonical unit (`*Canonical`) for comparable plotting. */ declare const labValueSchema: z.ZodObject<{ id: z.ZodString; profileId: z.ZodString; reportId: z.ZodString; parameterKey: z.ZodString; date: z.ZodISODate; valueRaw: z.ZodNumber; unitRaw: z.ZodString; valueCanonical: z.ZodNumber; unitCanonical: z.ZodString; refLow: z.ZodOptional; refHigh: z.ZodOptional; refLowCanonical: z.ZodOptional; refHighCanonical: z.ZodOptional; refText: z.ZodOptional; refSource: z.ZodEnum<{ catalog: "catalog"; none: "none"; report: "report"; }>; flag: z.ZodEnum<{ high: "high"; in: "in"; low: "low"; unknown: "unknown"; }>; provenance: z.ZodObject<{ source: z.ZodEnum<{ "ai-extracted": "ai-extracted"; manual: "manual"; whoop: "whoop"; }>; sourceBridgeId: z.ZodOptional; externalId: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; type LabValue = z.infer; //#endregion //#region src/domain/lab/ref-text.d.ts type Bounds = { low?: number; high?: number; }; /** * Parse a printed reference range into numeric bounds. Recognizes * `"low-high"`, `"< high"`, and `"> low"` (with unicode dashes and * `≤ / ≥`). Returns `undefined` for text that carries no numeric bounds * (e.g. `"negativo"`), so the caller can flag the value as `"unknown"`. */ declare function parseRefTextBounds(refText: string): Bounds | undefined; //#endregion //#region src/domain/lab/unit-conversion.d.ts type AffineUnit = { factorToCanonical: number; offsetToCanonical?: number; }; /** valueCanonical = valueRaw × factor + offset (offset defaults to 0). */ declare function toCanonicalValue(valueRaw: number, unit: AffineUnit): number; /** Inverse of {@link toCanonicalValue}: valueRaw = (canonical − offset) / factor. */ declare function fromCanonicalValue(valueCanonical: number, unit: AffineUnit): number; /** * Resolve the affine transform for `unitRaw` on a parameter. The canonical * unit maps to identity (factor 1). A free parameter (`param` undefined) or an * unrecognized unit returns `null`, signalling passthrough (no conversion). */ declare function resolveAffineUnit(param: LabParameter | undefined, unitRaw: string): AffineUnit | null; type CanonicalMeasurement = { valueCanonical: number; unitCanonical: string; }; /** Convert an entered value to canonical, passing through when unresolvable. */ declare function convertMeasurement(param: LabParameter | undefined, valueRaw: number, unitRaw: string): CanonicalMeasurement; /** Convert an optional reference bound with the same affine transform. */ declare function convertBound(param: LabParameter | undefined, bound: number | undefined, unitRaw: string): number | undefined; //#endregion export { type Activity, type ActivityLevel, type ActivitySummary, type AdaptiveTdeeResult, type AffineUnit, type Analytics, type AnalyticsEvent, type AssembleDayEnergyBalanceInput, type AuthProvider, BODY_FAT_TOLERANCE_PERCENT, type BinaryReader, type BinaryWriter, type BiologicalSex, type BmrFormula, type BmrInput, type BmrResult, type BodyComposition, type BridgeId, CUSTOM_PARAMETER_PREFIX, type CadenceValue, type CanonicalMeasurement, type CatalogFallback, type ComputeAdaptiveTdeeInput, type ComputeDailyDeltaInput, type ComputeDailyDeltaResult, type ComputeFlagInput, type ComputeMacroTargetsInput, type ComputePeriodizedTargetInput, DAILY_KCAL_TOLERANCE, DAILY_STEPS_TOLERANCE, DEFAULT_MET, DEFAULT_NEAT_FACTOR, DEFAULT_TOLERANCES, type DailyWellness, type DayEnergyBalance, type DayExpenditureInput, type DayExpenditureResult, type Duration, type DurationType, type EmaOptions, type EmaPoint, type EmaResult, type EnergyBalanceRollup, type EnergyGoal, type Equipment, type ExpectedActivityKcalInput, type ExpenditureSource, FIT_TO_SWIM_STROKE, FLOOR_KCAL, type FileType, FitParsingError, GarminParsingError, type GoalType, HEART_RATE_SERIES_BPM_TOLERANCE, HRV_TOLERANCE_MS, type HashProjection, type HealthExtensionPayload, type HealthFileType, type HeartRateSeries, type HeartRateValue, type HrvSummary, type Intensity, KCAL_PER_KG_FAT, type KRD, type KRDEvent, type KRDExtensions, type KRDLap, type KRDLapTrigger, type KRDMetadata, type KRDRecord, type KRDSession, type KnownUnit, KrdValidationError, LAB_PARAMETER_CATALOG, type LabFlag, type LabPanel, type LabParameter, type LabProvenance, type LabRefRange, type LabRefSource, type LabReport, type LabValue, type LengthUnit, type ListOptions, type LogLevel, type Logger, MANAGED_DATA_REGISTRY, MET_TABLE, MIN_ADAPTIVE_DAYS, MUSCLE_SURPLUS_CAP, type MacroNutrients, type ManagedDataRegistryEntry, type ManagedDataType, type MealSlot, type MeasuredWellness, NEAT_FACTOR, POWER_ZONES, POWER_ZONE_PERCENT_FTP, type PaceValue, type PlannedSession, type PlannedSessionStatus, type PowerValue, type PowerZone, type ProfileSnapshot, type PushResult, type RepetitionBlock, type ResolvedExpenditure, SLEEP_STAGE_TOLERANCE_SECONDS, SLEEP_TOTAL_DURATION_TOLERANCE_SECONDS, STALE_SNAPSHOT_THRESHOLD_DAYS, STRAIN_SCORE_TOLERANCE, STRESS_TOLERANCE, SWIM_STROKE_TO_FIT, type SchemaValidator, ServiceApiError, ServiceAuthError, type Sex, type SleepRecord, type SleepStage, type Sport, type SportCategory, type StrainSummary, type StressEpisode, type StrokeTypeValue, type SubSport, type SwimStroke, type Target, type TargetType, type TargetUnit, TcxParsingError, TcxValidationError, type TextReader, type TextWriter, type TokenData, type TokenStore, type ToleranceChecker, type ToleranceConfig, ToleranceExceededError, type ToleranceViolation, type TrainingZoneBand, type TrainingZoneSet, type TrainingZones, UnsupportedKrdTypeError, VITALS_RESPIRATORY_RATE_TOLERANCE, VITALS_RESTING_HEART_RATE_TOLERANCE, VITALS_SPO2_TOLERANCE, type ValidateRoundTrip, type ValidationError, type VitalsSummary, WEIGHT_TOLERANCE_KG, type WeightMeasurement, type Workout, type WorkoutService, type WorkoutStep, type WorkoutSummary, ZwiftParsingError, ZwiftValidationError, activitySchema, activitySummarySchema, aggregateEnergyBalance, assembleDayEnergyBalance, bodyCompositionSchema, canonicalHash, computeAdaptiveTdee, computeBmr, computeDailyDelta, computeFlag, computeMacroTargets, computePeriodizedTarget, convertBound, convertLengthToMeters, convertMeasurement, createConsoleLogger, createFitParsingError, createGarminParsingError, createKrdValidationError, createNoopAnalytics, createSchemaValidator, createServiceApiError, createServiceAuthError, createTcxParsingError, createTcxValidationError, createToleranceChecker, createUnsupportedKrdTypeError, createWorkoutKRD, createZwiftParsingError, createZwiftValidationError, customParameterKey, dailyWellnessSchema, dayEnergyBalanceSchema, deriveExternalId, durationSchema, durationTypeSchema, energyGoalSchema, equipmentSchema, estimateExpectedActivityKcal, expenditureSourceSchema, exponentialMovingAverage, extractWorkout, fileTypeSchema, fingerprintSnapshot, fromBinary, fromCanonicalValue, fromText, getLabParameter, goalTypeSchema, healthExtensionPayloadSchema, healthFileTypes, heartRateSeriesSchema, hrvSummarySchema, intensitySchema, isCustomParameterKey, isHealthFileType, isPowerZone, isRepetitionBlock, knownUnitSchema, krdEventSchema, krdExtensionsSchema, krdLapSchema, krdLapTriggerSchema, krdMetadataSchema, krdRecordSchema, krdSchema, krdSessionSchema, labFlagSchema, labPanelSchema, labParameterSchema, labProvenanceSchema, labRefRangeSchema, labRefSourceSchema, labReportSchema, labValueSchema, lengthUnitSchema, macroNutrientsSchema, managedDataTypes, mealSlotSchema, metForSport, neatFactorForActivityLevel, parseRefTextBounds, percentFtpToZone, plannedSessionSchema, plannedSessionStatusSchema, profileSnapshotSchema, repetitionBlockSchema, resolveAffineUnit, resolveDayExpenditure, sleepRecordSchema, sleepStageSchema, sportCategory, sportSchema, strainSummarySchema, stressEpisodeSchema, subSportSchema, swimStrokeSchema, targetSchema, targetTypeSchema, targetUnitSchema, toBinary, toCanonicalValue, toText, toleranceConfigSchema, toleranceViolationSchema, trainingZoneBandSchema, trainingZoneSetSchema, trainingZonesSchema, validateKrd, validateRoundTrip, vitalsSummarySchema, weightMeasurementSchema, workoutLikeFileTypes, workoutSchema, workoutStepSchema, zoneToPercentFtp }; //# sourceMappingURL=index.d.ts.map