// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 重点关注列表 */
export async function getInvolvedList(
  params: API.SearchInvolvedParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/recognition_people/`,
    {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 任务轨迹列表 */
export async function getInvolvedTravelList(
    params: API.SearchInvolvedTravelParams,
    options?: { [key: string]: any },
  ) {
    return request<API.Response & { data?: API.PageResult; msg?: string }>(
      `/api/travel_track/`,
      {
        method: 'GET',
        headers: {
          'Content-Type': 'application/json',
        },
        params: {
          ...params,
        },
        ...(options || {}),
      },
    );
}

/** 关注与取消关注 */
export async function postRecognition(
    body: API.RecognitionParams,
    options?: { [key: string]: any },
  ) {
    return request<API.Response & { data?: API.PageResult; msg?: string }>(
      `/api/recognition_people/`,
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
      },
    );
}

/** 上传重点关注列表 */
export async function getUploadInvolvedList(
  params: API.SearchInvolvedParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/upload_recognition_people/`,
    {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 上传任务轨迹列表 */
export async function getUploadInvolvedTravelList(
  params: API.SearchInvolvedTravelParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/upload_travel_track/`,
    {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 上传关注与取消关注 */
export async function postUploadRecognition(
  body: API.RecognitionParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/upload_recognition_people/`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}