export type ChannelType =
  | 'overview'
  | 'inbox'
  | 'tasks'
  | 'ai_sessions'
  | 'notes_sources'
  | 'cron'
  | 'custom_link';

export type WorkbenchProject = {
  id: number;
  name: string;
  description: string;
  initials: string;
  unreadCount: number;
};

export type WorkbenchChannel = {
  id: string;
  projectID: number;
  type: ChannelType;
  title: string;
  icon: string;
  count?: number;
  url?: string;
  sortOrder: number;
};

export type InboxMessage = {
  id: string;
  source: string;
  title: string;
  summary: string;
  status: 'open' | 'processed' | 'archived';
  tag: string;
  time: string;
};

export type WorkTask = {
  id: string;
  title: string;
  summary: string;
  completed: boolean;
  owner: string;
  due: string;
  tag: string;
};

export type AISessionItem = {
  id: string;
  title: string;
  summary: string;
  updatedAt: string;
  references: string[];
};

export type NoteSourceItem = {
  id: string;
  kind: 'note' | 'file' | 'link';
  title: string;
  updatedAt: string;
  tag: string;
  source: string;
};

export type CronPlan = {
  id: string;
  title: string;
  schedule: string;
  nextRun: string;
  enabled: boolean;
  lastResult: string;
  owner: string;
};

export type InspectorItem = {
  title: string;
  type: string;
  description: string;
  properties: Array<{ label: string; value: string }>;
};

export type ProjectWorkspace = {
  project: WorkbenchProject;
  channels: WorkbenchChannel[];
  tags: string[];
  recentSessions: AISessionItem[];
  inbox: InboxMessage[];
  tasks: WorkTask[];
  aiSessions: AISessionItem[];
  notesSources: NoteSourceItem[];
  cronPlans: CronPlan[];
};
