/** Paginated API response wrapper */
export type PagedResult<T> = {
  items: T[];
  page: number;
  pageSize: number;
  total: number;
};

/** Facet item returned by search APIs */
export type FacetItem<T = number> = {
  id: T;
  name: string;
  count: number;
};

/** Entry search facets */
export type EntryFacets = {
  genres: FacetItem<number>[];
  languages: FacetItem<string>[];
  machinetypes: FacetItem<number>[];
  flags: { hasAliases: number; hasOrigins: number };
};

/** Entry search scope */
export type EntrySearchScope = "title" | "title_aliases" | "title_aliases_origins";
