import { ndmClient, userClient, type Station } from '@/apis';
import { unwrapVoidResponse } from '@/utils';

export const resetMonitorScheduleApi = async (options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
  const { stationCode, signal } = options ?? {};
  const client = stationCode ? ndmClient : userClient;
  const prefix = stationCode ? `/${stationCode}` : '';
  const endpoint = `${prefix}/api/ndm/ndmConstant/anyTenant/resetMonitorSchedule`;
  const resp = await client.get<void>(endpoint, { signal });
  unwrapVoidResponse(resp);
};
