import {
  AccountQueryParam,
  AccountPageResult,
  SetSupervisedForm,
  IdQueryParam,
  AccountItem
} from '@/types/api/member/account';
import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * "获取合约交易账户列表"
 * @param data
 */
export function accountList(data: AccountQueryParam): AxiosPromise<AccountPageResult> {
  return request({
    url: 'admin/member/under-supervised',
    method: 'post',
    params: data
  });
}


/**
 * 设置交易账户是否被监控
 * @param data 
 * @returns 
 */
export function setIsSupervised(data: SetSupervisedForm): any {
  return request({
    url: `admin/swap/account/updateIsSupervised`,
    method: 'post',
    params: data
  });
}

/**
 * "获取会员账户详情"
 * @param data
 */
export function getAccountDetail(data: IdQueryParam): AxiosPromise<AccountItem> {
  return request({
    url: 'admin/swap/account/get',
    method: 'get',
    params: data
  });
}
