import { useApi } from '~/composables/useApi' import { createWorkflowService } from '~/services/workflow-service' import type { ReceptionData, ReceptionPayload } from '~/services/dto/reception-data' import type { WeightData } from '~/services/dto/weight-data' const service = createWorkflowService('receptions', 'reception') export const getReceptionList = service.getList export const getReception = service.get export const createReception = service.create export const updateReception = service.update export const getWeight = service.getWeight as () => Promise export async function deleteReception(id: number) { const api = useApi() return api.delete(`receptions/${id}`, {}, { toastSuccessKey: 'success.reception.delete', toastErrorKey: 'errors.reception.delete' }) } export { service as receptionService }