import type { Freight } from "@edr/types";

import { api } from "../utils/api";

export const trackingService = {
  forConsignment: async (
    consignmentId: string,
  ): Promise<Freight.ITrackingEvent[]> => {
    const { data } = await api.get(`/tracking/${consignmentId}`);
    return data.data;
  },
};
