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

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

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