/** * Light Engine Charlie API - TypeScript Type Definitions * Generated for all REST API endpoints * @version 1.0.0 */ export interface ApiResponse { success?: boolean; message?: string; timestamp: string; data?: T; } export interface ErrorResponse { detail: string; status?: number; } export interface SensorReading { value: number; unit?: string; } export interface SensorPayload { scope: string; ts: string; sensors: Record; } export interface LatestReadingsResponse { scope: string; sensors: Record; observedAt: string; } export interface SensorHistory { value: number; ts: string; } export interface SensorData { value?: number; unit?: string; observedAt?: string; history: SensorHistory[]; } export interface ScopeMetadata { name: string; createdAt: string; } export interface ScopeData { sensors: Record; metadata: ScopeMetadata; } export interface EnvCacheResponse { scopes: Record; meta: { updatedAt: string | null; source: string; }; } export interface EnvScopesResponse { scopes: string[]; count: number; timestamp: string; } export interface EnvHistoryParams { scope: string; metric: string; hours?: number; } export interface EnvHistoryResponse { scope: string; metric: string; data: SensorHistory[]; count: number; timestamp: string; } export type DeviceProtocol = "kasa" | "mqtt" | "ble" | "mdns"; export interface DiscoveryDevice { id: string; name: string; protocol: DeviceProtocol; host?: string; mac?: string; model?: string; metadata?: Record; } export interface DiscoveryTriggerResponse { status: "accepted"; message: string; timestamp: string; } export interface DiscoveryDevicesResponse { devices: DiscoveryDevice[]; count: number; timestamp: string; } export interface ProtocolDevicesResponse { protocol: DeviceProtocol; devices: DiscoveryDevice[]; count: number; timestamp: string; } export interface DevicesListResponse { devices: DiscoveryDevice[]; count: number; timestamp: string; } export interface WifiNetwork { ssid: string; signal?: number; security?: string; } export interface WifiScanResponse { available: boolean; networks?: WifiNetwork[]; count?: number; message?: string; timestamp: string; } export interface NetworkTestRequest { host: string; port?: number; protocol?: string; } export interface NetworkTestResponse { success: boolean; reachable: boolean; host: string; port: number; protocol: string; message: string; error?: string; timestamp: string; } export interface DeviceCommandRequest { device_id: string; command: Record; } export interface DeviceCommandResponse { success: boolean; device_id: string; command: Record; message: string; timestamp: string; } export interface LightingFixture { id: string; name: string; protocol: string; channels?: string[]; max_brightness?: number; } export interface LightingFixturesResponse { fixtures: LightingFixture[]; count: number; timestamp: string; } export interface FailsafePowerRequest { fixtures: string[]; power: "on" | "off"; brightness?: number; } export interface FailsafeResult { fixture_id: string; success: boolean; power?: string; brightness?: number; error?: string; } export interface FailsafePowerResponse { results: FailsafeResult[]; total: number; successful: number; timestamp: string; } export interface RuleCondition { sensor?: string; operator?: "gt" | "lt" | "eq" | "gte" | "lte"; value?: number; time_range?: { start: string; end: string; }; [key: string]: any; } export interface RuleAction { device_id?: string; command?: string; brightness?: number; power?: "on" | "off"; [key: string]: any; } export interface AutomationRule { rule_id?: string; name: string; enabled?: boolean; conditions: Record; actions: Record; priority?: number; } export interface RulesListResponse { rules: AutomationRule[]; count: number; timestamp: string; } export interface RuleCreateResponse { success: boolean; rule_id: string; message: string; timestamp: string; } export interface RuleUpdateResponse { success: boolean; rule_id: string; message: string; timestamp: string; } export interface RuleDeleteResponse { success: boolean; rule_id: string; message: string; timestamp: string; } export interface SetupContext { device_type?: string; protocol?: string; network?: string; [key: string]: any; } export interface SetupAssistRequest { query: string; context?: SetupContext; } export interface SetupStep { step: number; instruction: string; details?: string; } export interface SetupAssistResponse { response: string; steps?: SetupStep[]; confidence?: number; timestamp: string; } export interface HealthResponse { service: string; status: "running" | "degraded" | "down"; version: string; timestamp?: string; } export interface ApiClientConfig { baseUrl: string; timeout?: number; headers?: Record; } export interface RequestOptions { method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; headers?: Record; body?: any; params?: Record; } export declare function isErrorResponse(response: any): response is ErrorResponse; export declare function isSuccessResponse(response: any): response is ApiResponse; export type Nullable = T | null; export type Optional = T | undefined; export type AsyncResponse = Promise; //# sourceMappingURL=api-types.d.ts.map