import { api } from "@/config";
import { API_GET_ALARM, API_MANAGER_ALARM } from "@/constants";

export async function queryAlarms(payload: Model.AlarmPayload) {
  return await api.get<Model.AlarmResponse>(API_GET_ALARM, {
    params: payload,
  });
}

export async function queryConfirmAlarm(body: Model.AlarmConfirmRequest) {
  return await api.post(API_MANAGER_ALARM, body);
}
export async function queryrUnconfirmAlarm(body: Model.AlarmConfirmRequest) {
  return await api.delete(API_MANAGER_ALARM, { data: body });
}
