import { UserInfo } from "../Users"; export type CalendarItemKind = "EVENT" | "TASK"; export type CalendarVisibility = "PRIVATE" | "PUBLIC"; export type BusyStatus = "BUSY" | "FREE"; export declare enum relatedType { CONTACT = 1, DEBT = 2, TICKET = 3 } export interface IRelatedRef { type: relatedType; id: string; } export declare enum EventNotificationPeriod { MINUTE = 1, HOUR = 2, DAY = 3, WEEK = 4 } export interface IReminder { id: string; /** Absolute reminder time (optional if using offset). */ remindAt?: Date; /** * Offset relative to: * - EVENT: occurrence startAt * - TASK: dueAt */ offsetValue?: number; offsetUnit?: EventNotificationPeriod; sendToContact: boolean; } export interface ISyncRef { provider: "NONE" | "GOOGLE"; /** External calendar id (e.g., Google calendarId) */ externalCalendarId?: string; /** External item id (e.g., Google eventId / taskId) */ externalItemId?: string; /** iCal UID (useful for correlation with Google/iCal) */ iCalUID?: string; /** Provider ETag / version for concurrency */ etag?: string; lastSyncedAt?: Date; syncState?: "PENDING" | "SYNCED" | "ERROR"; syncError?: string; } export interface IAuditFields { createdAt: Date; createdBy: UserInfo; updatedAt?: Date; updatedBy?: UserInfo; deletedAt?: Date; deletedBy?: UserInfo; } export interface ICalendarItemType { id: string; name: string; color: string; icon: string; /** Indicates whether this type applies to events or tasks. */ kind: CalendarItemKind; } export interface ICalendarItemBase extends IAuditFields { id: string; spaceId: string; kind: CalendarItemKind; visibility: CalendarVisibility; title: string; details: string; location?: string; color?: string; type?: ICalendarItemType; related?: IRelatedRef[]; sharedWith?: UserInfo[]; reminders?: IReminder[]; sync?: ISyncRef; }