on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
102 lines (101 loc) • 2.27 kB
TypeScript
export interface CalendarEvent {
id: string;
title: string;
description?: string;
date: string;
time: string;
duration?: number;
location?: string;
color?: string;
isAllDay?: boolean;
priority?: 'low' | 'medium' | 'high';
category?: string;
tags?: string[];
attendees?: string[];
reminder?: number;
recurring?: {
type: 'daily' | 'weekly' | 'monthly' | 'yearly';
interval: number;
endDate?: string;
};
attachments?: {
name: string;
url: string;
type: string;
}[];
createdAt: number;
updatedAt: number;
}
export interface Calendar {
id: string;
title: string;
description?: string;
events: CalendarEvent[];
createdAt: number;
updatedAt: number;
}
export interface CreateEventData {
title: string;
description?: string;
date: string;
time: string;
duration?: number;
location?: string;
color?: string;
isAllDay?: boolean;
priority?: 'low' | 'medium' | 'high';
category?: string;
tags?: string[];
attendees?: string[];
reminder?: number;
recurring?: {
type: 'daily' | 'weekly' | 'monthly' | 'yearly';
interval: number;
endDate?: string;
};
attachments?: {
name: string;
url: string;
type: string;
}[];
}
export interface CreateCalendarData {
title: string;
description?: string;
events?: CreateEventData[];
}
export type UpdateEventData = Partial<CreateEventData>;
export type UpdateCalendarData = Partial<CreateCalendarData>;
export interface Category {
id: string;
name: string;
color: string;
createdAt: number;
}
export interface Tag {
id: string;
name: string;
color: string;
createdAt: number;
}
export interface Reminder {
id: string;
eventId: string;
calendarId: string;
triggerTime: number;
message: string;
isShown: boolean;
createdAt: number;
}
export interface RecurringEvent {
id: string;
baseEventId: string;
calendarId: string;
nextOccurrence: string;
pattern: {
type: 'daily' | 'weekly' | 'monthly' | 'yearly';
interval: number;
endDate?: string;
};
createdAt: number;
}