import { apiRequest, type ApiOutcome } from './client' /* `hub/blocking/app-lists/count`: how many domains the block lists of the Advanced Blocking app hold on one server. The hub downloads them (the app has no API for it) and caches the counts for hours. A list it could not read has `count: null` and the reason in `error`. */ export interface ListCount { url: string count: number | null error?: string } export interface ListCounts { lists: ListCount[] /** The sum of the lists that were counted. */ total: number } export function getAppListCounts( token: string | null, name: string, node: string, ): Promise> { return apiRequest('hub/blocking/app-lists/count', { token, body: { name, node } }) }