import { get, post } from './request'; import type { Device, ControlCommand } from '@/types'; export function getDevices(params?: Record): Promise { return get('/devices', params); } export function getDevice(id: string): Promise { return get(`/devices/${id}`); } export function sendControl(command: ControlCommand): Promise { return post('/control/send', command as unknown as Record); } export function getControlLogs(params?: Record): Promise { return get('/control/logs', params); }