import { HcApi } from '../../request/index'

export default {
    //分页
    async page(form) {
        return HcApi({
            url: '/api/blade-resource/sms/list',
            method: 'get',
            params: form,
        })
    },
    //详情
    async detail(id) {
        return HcApi({
            url: '/api/blade-resource/sms/detail',
            method: 'get',
            params: { id },
        })
    },
    //新增和编辑
    async submit(form) {
        return HcApi({
            url: '/api/blade-resource/sms/submit',
            method: 'post',
            data: form,
        })
    },
    //删除
    async del(ids) {
        return HcApi({
            url: '/api/blade-resource/sms/remove',
            method: 'post',
            params: { ids },
        })
    },
    async enable(id) {
        return HcApi({
            url: '/api/blade-resource/sms/enable',
            method: 'post',
            params: { id },
        })
    },
    async send(form) {
        return HcApi({
            url: '/api/blade-resource/sms/endpoint/send-message',
            method: 'post',
            params: form,
        })
    },
}
