mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
26 lines
714 B
TypeScript
26 lines
714 B
TypeScript
import { httpJson } from "@portal/api/http";
|
|
import type { SourcesResponse } from "@portal/mocks/sources";
|
|
import type { Tier } from "@portal/contexts/TierContext";
|
|
|
|
export type {
|
|
AgentDetail,
|
|
ApiClientDetail,
|
|
BasicDetail,
|
|
Source,
|
|
SourceDetail,
|
|
SourceStatus,
|
|
SourceType,
|
|
SourceTypeMeta,
|
|
SourcesKpi,
|
|
SourcesResponse,
|
|
WebhookDetail,
|
|
} from "@portal/mocks/sources";
|
|
export { SOURCE_STATUS_TONE, SOURCE_TYPE_META } from "@portal/mocks/sources";
|
|
|
|
/** GET /v1/sources?tier=… — KPI strip + the sources table for the tier. */
|
|
export async function fetchSources(tier: Tier): Promise<SourcesResponse> {
|
|
return httpJson<SourcesResponse>(
|
|
`/v1/sources?tier=${encodeURIComponent(tier)}`,
|
|
);
|
|
}
|