// NOTE: These types are copied from @raydiant/playlist-rule-engine. Since the rule // engine depends on the API for other types we should consider replacing the rule // engine types with these api types. export type RuleVariablePath = Array; export interface RuleVariable { var: RuleVariablePath; } export interface RuleConstant { const: string | number | boolean | Array; } export interface RuleOperatorType { type: | 'equals' | 'notEquals' | 'contains' | 'notContains' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual'; left: RuleVariable | RuleConstant; right: RuleVariable | RuleConstant; } export interface RuleGroupType { type: 'and' | 'or'; group: Rule[]; } export interface RuleScheduleType { type: 'schedule'; startDatetime: string; endDatetime: string; tzid: string; recurrenceRule?: { freq: string; dtstart: string; interval: number; byday?: Array<'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU'>; }; } export type Rule = RuleOperatorType | RuleGroupType | RuleScheduleType;