import { requestClient } from '#/api/request';

// 全国公共资源爬虫
export function runSpider(data: any) {
  return requestClient.post(`/spider/run`, data);
}

// 广州公共资源爬虫
export function runSpiderGz(appId: string, data: any) {
  return requestClient.post(`/spider2/run/${appId}`, data);
}

export function getSpiderStatus() {
  return requestClient.post(`/spider/status`);
}

export function getSpiderLogs() {
  return requestClient.post(`/v1/workflow/list`);
}

export function stopSpider() {
  return requestClient.post(`/spider/stop`);
}
