import { ndmClient, userClient, type NdmSnmpLogPageQuery, type NdmSnmpLogResultVO, type PageParams, type PageResult } from '@/apis'; export const pageSnmpLogApi = async (pageQuery: PageParams, options?: { stationCode?: string; signal?: AbortSignal }) => { const { stationCode, signal } = options ?? {}; const client = stationCode ? ndmClient : userClient; const prefix = stationCode ? `/${stationCode}` : ''; const endpoint = `${prefix}/api/ndm/ndmSnmpLog/page`; const resp = await client.post>(endpoint, pageQuery, { signal }); const [err, data] = resp; if (err || !data) { throw err; } return data; };