Skip to content

@kaiord/core


@kaiord/core / targetSchema

Variable: targetSchema

const targetSchema: ZodDiscriminatedUnion<[ZodObject<{ type: ZodLiteral<"power">; value: ZodDiscriminatedUnion<[ZodObject<{ unit: ZodLiteral<"watts">; value: ZodNumber; }, $strip>, ZodObject<{ unit: ZodLiteral<"percent_ftp">; value: ZodNumber; }, $strip>, ZodObject<{ unit: ZodLiteral<"zone">; value: ZodNumber; }, $strip>, ZodObject<{ max: ZodNumber; min: ZodNumber; unit: ZodLiteral<"range">; }, $strip>], "unit">; }, $strip>, ZodObject<{ type: ZodLiteral<"heart_rate">; value: ZodDiscriminatedUnion<[ZodObject<{ unit: ZodLiteral<"bpm">; value: ZodNumber; }, $strip>, ZodObject<{ unit: ZodLiteral<"zone">; value: ZodNumber; }, $strip>, ZodObject<{ unit: ZodLiteral<"percent_max">; value: ZodNumber; }, $strip>, ZodObject<{ max: ZodNumber; min: ZodNumber; unit: ZodLiteral<"range">; }, $strip>], "unit">; }, $strip>, ZodObject<{ type: ZodLiteral<"cadence">; value: ZodDiscriminatedUnion<[ZodObject<{ unit: ZodLiteral<"rpm">; value: ZodNumber; }, $strip>, ZodObject<{ max: ZodNumber; min: ZodNumber; unit: ZodLiteral<"range">; }, $strip>], "unit">; }, $strip>], "type">

Defined in: packages/core/src/domain/schemas/target.ts:21

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.