import type { AddId, Customer } from '@/model/customer' import useAxios from '@core/utils/useAxios' import type { last, Price } from '@/model/price' import type { TableInput } from '@core/type/baseTable' import type { Order } from '@/model/order' import type { FunctionItem } from '@/model/Item' import sms from '@/router/routes/sms' import type { Sms } from '@/model/sms' export const getSMSTable = async (params: TableInput) => await useAxios.post>('/admin/messages/table', params) export const getNumbersTable = async (params: TableInput) => await useAxios.post>('/admin/messages/get_customer_list/table', params) export const getGroupsList = async () => await useAxios.get(`/admin/messages/functions`) export const getCustomerList = async (obj: string[]) => await useAxios.post<{ customers: Customer[] }>(`/admin/messages/get_customer_list`, { functions: obj }) export const createSMS = async (obj: Sms) => await useAxios.post(`/admin/messages/send_message`, obj)