import client from './client'

export function sendMessage(data: any) {
  return client.post('/api/v1/send', data)
}

export function testSendMessage(data: any) {
  return client.post('/api/v1/send/test', data)
}

export function listSendRecords(taskId?: string) {
  if (taskId) {
    return client.get(`/api/v1/send/${taskId}/records`)
  }
  return client.get('/api/v1/send/list')
}
