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

export async function tagList(params: API.TagListParam) {
  return request<API.Response<API.Page<API.Tag>>>('/api/v1/tag/list', {
    method: 'POST',
    data: params,
  });
}

export async function tagCategoryList() {
  return request<API.Response<API.TagCategory[]>>('/api/v1/tag/listCategory', {
    method: 'POST',
  });
}

export async function addTag(params: API.AddTagParams) {
  return request<API.Response<API.Page<API.UserList>>>('/api/v1/tag/add', {
    method: 'POST',
    data: params,
  });
}

export async function updateTag(params: API.UpdateTagParams) {
  return request<API.Response<API.Page<API.UserList>>>('/api/v1/tag/update', {
    method: 'POST',
    data: params,
  });
}

export async function deleteTag(tagId: number) {
  return request<API.Response<any>>('/api/v1/tag/delete', {
    method: 'POST',
    data: {tagId,}
  });
}

export async function listUser(params: API.TagListUserParams) {
  return request<API.Response<any>>('/api/v1/tag/listUser', {
    method: 'POST',
    data: params
  });
}

export async function batchAddTagUser(params: API.BatchTagUser) {
  return request<API.Response<any>>('/api/v1/tag/batchAddUser', {
    method: 'POST',
    data: params
  });
}

export async function batchRemoveTagUser(params: API.BatchTagUser) {
  return request<API.Response<any>>('/api/v1/tag/batchRemoveUser', {
    method: 'POST',
    data: params
  });
}


