import { request } from '@/plugins/http-fetch';

/**
 * 查询文件列表列表
 * @param query 查询参数
 * @returns object
 */
export function listNeFiles(query: Record<string, any>) {
  return request({
    url: '/ne/action/files',
    method: 'get',
    params: query,
  });
}

/**
 * 从网元端获取文件
 * @param query 查询参数
 * @returns object
 */
export function getNeFile(query: Record<string, any>) {
  return request({
    url: '/ne/action/pullFile',
    method: 'get',
    params: query,
    responseType: 'blob',
    timeout: 180_000,
  });
}
