import { request } from '@/api';
import type { searchParams, accountListResponse, accountCreateParams } from '@/api/types/account/client'

// 获取客户列表
export async function getClientListApi(params: searchParams): Promise<accountListResponse> {
    return request.get<accountListResponse>('/user/getUserList', { ...params })
}

//获取代理列表
export async function getAgentOptionsApi(){
    return request.get('/user/getParOptions')
}

//获取手续费模板列表
export async function getFeeTemplateOptionsApi(){
    return request.get('/user/getFeeSettingOptions')
}

//获取风控模板列表
export async function getRiskTemplateOptionsApi() {
    return request.get('/user/getRiskControlOptions')
}

// 添加客户
export async function createClientApi(params: accountCreateParams): Promise<void> {
    return request.post<void>('/user/createUser', params)
}

// 更新客户
export async function editClientApi(params: accountCreateParams): Promise<void> {
    return request.post<void>('/user/editUser', params)
}
