export interface Machine { "id": string; "friendlyName"?: string | null; "platform"?: string | null; "arch"?: string | null; "status": string; "labels": Record; "metadata": Record; "createdAt": string; "updatedAt": string; } export interface Heartbeat { "machineId": string; "pid": number; "status": string; "updatedAt": string; "daemonVersion"?: string | null; "agentMode"?: string | null; "platform"?: string | null; "arch"?: string | null; "uptimeSeconds"?: number | null; "observedAt"?: string | null; } export interface RegisterMachineRequest { "id": string; "friendlyName"?: string | null; "platform"?: string | null; "arch"?: string | null; "status"?: string; "labels"?: Record; "metadata"?: Record; } export interface UpdateMachineRequest { "friendlyName"?: string | null; "platform"?: string | null; "arch"?: string | null; "status"?: string; "labels"?: Record; "metadata"?: Record; } export interface MachineList { "machines": Array; "count": number; } export interface HeartbeatList { "heartbeats": Array; "count": number; } export interface DeleteResult { "deleted": boolean; "id": string; } export interface HealthResponse { "status": string; "version": string; "mode": string; } export interface ReadyResponse { "status": string; "version": string; "mode": string; "pendingMigrations"?: Array; "latencyMs"?: number; } export interface ErrorResponse { "error": string; "reason"?: string; } export interface MachinesClientOptions { /** Base URL, e.g. process.env.APP_API_URL. */ baseUrl: string; /** API key, e.g. process.env.APP_API_KEY. Sent as the 'x-api-key' header. */ apiKey?: string; /** Custom fetch (defaults to global fetch). */ fetch?: typeof fetch; /** Extra headers merged into every request. */ headers?: Record; } export declare class ApiError extends Error { readonly status: number; readonly body: unknown; constructor(status: number, message: string, body: unknown); } export declare class MachinesClient { private readonly baseUrl; private readonly apiKey; private readonly fetchImpl; private readonly baseHeaders; constructor(options: MachinesClientOptions); private request; /** Liveness probe (no auth). */ health(init?: RequestInit): Promise; /** Readiness probe: reachable RDS and schema migrated (no auth). */ ready(init?: RequestInit): Promise; /** List agent heartbeats across the fleet. */ listHeartbeats(query?: { "machineId"?: string; "limit"?: number; }, init?: RequestInit): Promise; /** List registered machines. */ listMachines(query?: { "status"?: string; "limit"?: number; "offset"?: number; }, init?: RequestInit): Promise; /** Register (upsert) a machine. */ registerMachine(body: RegisterMachineRequest, init?: RequestInit): Promise; /** Fetch one machine by id. */ getMachine(id: string, init?: RequestInit): Promise; /** Deregister a machine. */ deleteMachine(id: string, init?: RequestInit): Promise; /** Partially update a machine. */ updateMachine(id: string, body: UpdateMachineRequest, init?: RequestInit): Promise; /** Service version and mode (no auth). */ version(init?: RequestInit): Promise; }