import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ManualreviewVO, ManualreviewForm, ManualreviewQuery } from '@/api/msg/manualreview/types';

/**
 * 查询手工短信审核列表
 * @param query
 * @returns {*}
 */

export const listManualreview = (query?: ManualreviewQuery): AxiosPromise<ManualreviewVO[]> => {
  return request({
    url: '/msg/manualreview/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询手工短信审核详细
 * @param smsId
 */
export const getManualreview = (smsId: string | number): AxiosPromise<ManualreviewVO> => {
  return request({
    url: '/msg/manualreview/' + smsId,
    method: 'get'
  });
};

/**
 * 新增手工短信审核
 * @param data
 */
export const addManualreview = (data: ManualreviewForm) => {
  return request({
    url: '/msg/manualreview',
    method: 'post',
    data: data
  });
};

/**
 * 修改手工短信审核
 * @param data
 */
export const updateManualreview = (data: ManualreviewForm) => {
  return request({
    url: '/msg/manualreview',
    method: 'put',
    data: data
  });
};

/**
 * 删除手工短信审核
 * @param smsId
 */
export const delManualreview = (smsId: string | number | Array<string | number>) => {
  return request({
    url: '/msg/manualreview/' + smsId,
    method: 'delete'
  });
};
