import { createWorkflowService } from '~/services/workflow-service' import type { ShipmentData, ShipmentPayload } from '~/services/dto/shipment-data' import type { WeightData } from '~/services/dto/weight-data' const service = createWorkflowService('shipments', 'shipment') export const getShipmentList = service.getList export const getShipment = service.get export const createShipment = service.create export const updateShipment = service.update export const getWeightShipment = service.getWeight as () => Promise export async function deleteShipment(id: number) { const { useApi } = await import('~/composables/useApi') const api = useApi() return api.delete(`shipments/${id}`, {}, { toastSuccessKey: 'success.shipment.delete', toastErrorKey: 'errors.shipment.delete' }) } export { service as shipmentService }