mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-14 00:00:30 +00:00
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import { apiFetchJSON } from '@/utils/apiClient';
|
|
|
|
export interface MonitoredSystemLedgerEntry {
|
|
name: string;
|
|
type: string;
|
|
status: string; // "online" | "offline" | "unknown"
|
|
last_seen: string; // RFC3339 or empty
|
|
source: string;
|
|
}
|
|
|
|
export interface MonitoredSystemLedgerResponse {
|
|
systems: MonitoredSystemLedgerEntry[];
|
|
total: number;
|
|
limit: number; // 0 = unlimited
|
|
}
|
|
|
|
export class MonitoredSystemLedgerAPI {
|
|
private static readonly baseUrl = '/api/license/monitored-system-ledger';
|
|
|
|
static async getLedger(): Promise<MonitoredSystemLedgerResponse> {
|
|
return apiFetchJSON<MonitoredSystemLedgerResponse>(this.baseUrl);
|
|
}
|
|
}
|