export type GraphMeta = {
  backend?: string;
  ttl_path?: string | null;
  sparql_endpoint?: string | null;
  include_bnodes?: boolean;
  graph_query_id?: string;
  node_limit?: number;
  edge_limit?: number;
  nodes?: number;
  edges?: number;
  layout_engine?: string;
  layout_root_iri?: string | null;
};

export type GraphRoutePoint = {
  x: number;
  y: number;
};

export type GraphRouteSegment = {
  edge_index: number;
  kind: string;
  points: GraphRoutePoint[];
};

export type SelectionQueryMeta = {
  id: string;
  label: string;
};

export type SelectionQueryResult = {
  queryId: string;
  selectedIds: number[];
  neighborIds: number[];
};

export type SelectionTripleTerm = {
  type: string;
  value: string;
  lang?: string;
};

export type SelectionTriple = {
  s: SelectionTripleTerm;
  p: SelectionTripleTerm;
  o: SelectionTripleTerm;
  subject_id?: number;
  predicate_id?: number;
  object_id?: number;
};

export type SelectionTripleResult = {
  queryId: string;
  selectedIds: number[];
  triples: SelectionTriple[];
};
