Kaizen
Browse modulesRulesrules/sharedTypes

Type Alias: PricingScheduleConfig

type PricingScheduleConfig = z.infer<typeof PricingScheduleConfig>;

Defined in: shared/rules/types/conditions.ts:732

Composite condition backing a pricing-matrix "Schedule" (PLA-136). One Conditions row = one whole Schedule. Precedent: HOUSEHOLD above is already a multi-field composite condition, not a new idiom.

Evaluates against the line's start date/time only (start_field) — not "any date in the span" the way DATE_INCLUDES does; deliberate divergence, consistent with the uniform-schedule-line v1 scoping (see condition-handlers.ts's pricingSchedule handler). duration is the one dimension that reads both start_field and end_field, since it's inherently about the span.

Validation (mirrors the overlap-detection algorithm's own constraints — see schedule-overlap.ts):

  • day_of_week.days must be non-empty (.min(1) above) and must not exclude all 7 days (matches nothing — a dead schedule).
  • holidays requires a bounded date_range on the same schedule.
  • date_range.exclude is unsupported in v1 (see PricingScheduleDateRangeConfig's doc).
  • At least one of day_of_week/time_range/date_range/duration/ holidays must be present — a fully wildcard schedule would conflict with every other schedule under reject-on-write with no tiebreak.