import { ndmClient, userClient, type NdmIcmpLogPageQuery, type NdmIcmpLogResultVO, type PageParams, type PageResult, type Station } from '@/apis'; export const pageIcmpLogApi = async (pageQuery: PageParams, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmIcmpLog/page`; const resp = await client.post>(endpoint, pageQuery, { signal }); const [err, data] = resp; if (err) throw err; if (!data) throw new Error(`${data}`); return data; };