import ITranslation from '../Translation'; export interface IPeriod { id: string; starts_at: Date; ends_at: Date; title?: ITranslation[]; } export interface IYearPeriods { [year: string]: IPeriod[]; } export interface IWeeklySchedule { [weekday_index: number]: IDaySchedule; } export interface IDaySchedule { open: boolean; schedule?: { opening_time: string; closing_time: string; }; } export interface IClosedDay extends IDaySchedule { start_date: Date; end_date?: Date; reason?: string; associated_stores: string[]; type: 'specific' | 'common'; created_by_store?: string; } export interface IStoreSchedule { id: string; store_id: string; associated_period: string; weekly_schedule: IWeeklySchedule; external?: boolean; external_link?: string; } export interface IPeriodSchedule { [period_id: string]: IStoreSchedule; } export interface ISpaceSchedule { id: string; space_periods_active: boolean; year_periods: IYearPeriods; common_closed_days: IClosedDay[]; store_schedules: { [store_id: string]: IPeriodSchedule; }; }