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

/**
 * 产品进度看板配置分页查询
 * @param params
 * @param options?
 */
export async function pageProductProgressKanbanSetting(
  body: KANBAN.Settings.ProductProgressKanbanSettingCriteria,
  options?: { [key: string]: any },
) {
  return request<
    Api.ServiceResult<Api.PageResult<KANBAN.Settings.ProductProgressKanbanSettingDto>>
  >('/productProgressKanbanSetting/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 产品进度看板配置创建
 * @param body
 * @param options
 */
export async function create(
  body: KANBAN.Settings.ProductProgressKanbanSettingCreate,
  options?: { [key: string]: any },
) {
  return request<Common.ServiceResult<string>>('/productProgressKanbanSetting/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 产品进度看板配置更新
 * @param body
 * @param options
 */
export async function update(
  body: KANBAN.Settings.ProductProgressKanbanSettingUpdate,
  options?: { [key: string]: any },
) {
  return request<Common.ServiceResult<string>>('/productProgressKanbanSetting/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/**
 * 产品进度看板配置删除
 * @param body
 * @param options
 */
export async function remove(body: Common.RemoveDto, options?: { [key: string]: any }) {
  return request<Common.ServiceResult<string>>(`/api/productProgressKanbanSetting/remove`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
