/**
 * Represents a node in the knowledge graph
 */
export interface GraphNode {
  id: string;
  slug: string;
  title: string;
  summary: string | null;
  status?: string;
  tags: {
    id: string;
    name: string;
    slug: string;
    color: string | null;
  }[];
  depth: number;
  isOrphan?: boolean;
}

/**
 * Represents an edge/link in the knowledge graph
 */
export interface GraphEdge {
  id: string;
  sourceId: string;
  targetId: string;
  linkText: string;
}

/**
 * Entry-centered graph response
 */
export interface EntryGraphResponse {
  centerNode: GraphNode;
  nodes: GraphNode[];
  edges: GraphEdge[];
  stats: {
    totalNodes: number;
    totalEdges: number;
    maxDepth: number;
  };
}

/**
 * Full knowledge graph response
 */
export interface FullGraphResponse {
  nodes: GraphNode[];
  edges: GraphEdge[];
  stats: {
    totalNodes: number;
    totalEdges: number;
    orphanCount: number;
  };
}

/**
 * Graph statistics response
 */
export interface GraphStatsResponse {
  totalEntries: number;
  totalLinks: number;
  orphanEntries: number;
  averageLinks: number;
  mostConnectedEntries: {
    id: string;
    slug: string;
    title: string;
    linkCount: number;
  }[];
  tagDistribution: {
    tagId: string;
    tagName: string;
    entryCount: number;
  }[];
}
