import { http } from './http' import type { AlarmFilters, AlarmPage } from '../types' export interface AlarmQuery { device_code?: string alarm_type?: string page?: number page_size?: number } export async function fetchAlarms(params: AlarmQuery): Promise { const res = await http.get('/api/alarms', { params }) return res.data } export async function fetchAlarmFilters(): Promise { const res = await http.get('/api/alarm-filters') return res.data }