import http from '../../index'
import type { LoginEtssmsRequest, SendTtsSmsRequest, RegisterUrlRequest } from './type.d'
import type { PushRecordIdRequest } from '../invoiceInformation/type.d'

export const getPubNameApi = (data: PushRecordIdRequest) => {
  return http.get({
    url: '/admin/invoice-record/pub',
    params: data,
  })
}

export const sendEtsSmsApi = (data: SendTtsSmsRequest) => {
  return http.post({
    url: '/admin/invoice-order/send-ets-sms',
    data: data,
  })
}

export const loginEtssmsApi = (data: LoginEtssmsRequest) => {
  return http.post({
    url: '/auth/login/etssms',
    params: data,
  })
}

export const registerUrlApi = (params: RegisterUrlRequest) => {
  return http.get({
    url: '/admin/invoice/register-url',
    params: params,
  })
}
