Skip to content

@kaiord/core


@kaiord/core / durationTypeSchema

Variable: durationTypeSchema

const durationTypeSchema: 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"; }>

Defined in: packages/core/src/domain/schemas/duration-type.ts:18

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');