export interface EventRecord {
  readonly id: string;
  readonly deviceId: string;
  readonly calendarId: string | null;
  readonly externalId: string;
  readonly title: string;
  readonly notes: string | null;
  readonly location: string | null;
  readonly url: string | null;
  readonly isAllDay: boolean;
  readonly startDate: string;
  readonly endDate: string;
  readonly status: string;
  readonly availability: string;
  readonly isDetached: boolean;
  readonly hasRecurrence: boolean;
  readonly recurrenceRule: string | null;
  readonly organizerEmail: string | null;
  readonly organizerName: string | null;
  readonly attendeeCount: number;
  readonly createdAt: string | null;
  readonly modifiedAt: string | null;
  readonly syncedAt: string;
}

export interface EventDraft {
  readonly id: string;
  readonly deviceId: string;
  readonly calendarId: string | null;
  readonly externalId: string;
  readonly title: string;
  readonly notes: string | null;
  readonly location: string | null;
  readonly url: string | null;
  readonly isAllDay: boolean;
  readonly startDate: string;
  readonly endDate: string;
  readonly status: string;
  readonly availability: string;
  readonly isDetached: boolean;
  readonly hasRecurrence: boolean;
  readonly recurrenceRule: string | null;
  readonly organizerEmail: string | null;
  readonly organizerName: string | null;
  readonly attendeeCount: number;
  readonly createdAt: string | null;
  readonly modifiedAt: string | null;
}

export interface EventSearchHit {
  readonly event: EventRecord;
  readonly rank: number;
  readonly snippet: string;
}

export interface EventFilter {
  readonly deviceId?: string;
  readonly startAfter?: string;
  readonly startBefore?: string;
  readonly calendarId?: string;
  readonly limit?: number;
  readonly offset?: number;
}
