Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Function normalizeScheduleRule

    • Validate and canonicalize one rule as a client sends it. Numbers are rounded to whole minutes; empty strings read as absent; id is kept only when it is a non-empty string. isValidTimeZone is injected because the check needs Intl, which the caller may want to stub or skip.

      Parameters

      • raw: Record<string, unknown>
      • options: { isValidTimeZone?: (zone: string) => boolean } = {}

      Returns ScheduleValidation<ScheduleRule>