/** Typed fetch wrappers for the web UI API, plus the realtime event stream. */ import type { Automation, AutomationRelationships, DeviceDescriptor, ExecutionRecord, HomekitStatus, LogEntry, RoomWithMembers, StateMap, StatusData, TriggerContext } from "./types.js"; export declare function initApi(basePath: string, token: string): void; export declare function apiFetch(path: string, options?: RequestInit): Promise; export declare function fetchStatus(): Promise; export declare function fetchAutomations(): Promise; export declare function fetchAutomation(name: string): Promise; export declare function setAutomationEnabled(name: string, enabled: boolean): Promise; export declare function fetchAutomationSource(name: string): Promise; export declare function fetchAutomationHistory(name: string): Promise; export declare function fetchAutomationRelationships(name: string): Promise; export declare function triggerAutomation(name: string, context: Record): Promise; /** Builds a minimal manual-trigger body for {@link triggerAutomation} from an automation's declared trigger types. */ export declare function manualTriggerContext(type: TriggerContext["type"]): Record; export declare function fetchState(): Promise; export declare function setStateKey(key: string, value: unknown): Promise; export declare function deleteStateKey(key: string): Promise; export declare function fetchLogs(limit?: number): Promise; export declare function fetchDeviceCatalog(): Promise; export declare function fetchDevice(qualifiedId: string): Promise; export declare function sendDeviceCommand(qualifiedId: string, properties: Record): Promise; export declare function assignDeviceRoom(qualifiedId: string, roomId: string): Promise; export declare function unassignDeviceRoom(qualifiedId: string): Promise; export declare function hideDevice(qualifiedId: string): Promise; export declare function unhideDevice(qualifiedId: string): Promise; export declare function fetchRooms(): Promise; export declare function fetchUnassignedDevices(): Promise; export declare function createRoom(name: string): Promise<{ id: string; name: string; }>; export declare function renameRoom(id: string, name: string): Promise<{ id: string; name: string; }>; export declare function deleteRoom(id: string): Promise; /** `null` when the HomeKit service is not configured (the route itself is unregistered → 404). */ export declare function fetchHomekitStatus(): Promise; /** * Opens the realtime event stream (design.md D9; specs/web-ui "Data * Sources"). Cookie-based session auth travels automatically with an * `EventSource` request — there is no way to attach an `Authorization` * header to one — so this relies entirely on the session cookie set at * login, exactly like every other same-origin browser navigation here. */ export declare function openEventStream(): EventSource; //# sourceMappingURL=api.d.ts.map