Open fabiancook opened 1 year ago
Ended up using:
import {Identifier} from "../identifier";
export type ShipmentStatus = "pending" | "processing" | "sent" | "delivered";
export interface ShipmentLocation {
locationId?: string; // Optional fixed location
address?: string[]; // Human-readable address
countryCode?: string;
}
export interface ShipmentIdentifiers {
identifiers?: Identifier[];
}
export interface ShipmentFrom extends ShipmentLocation, ShipmentIdentifiers {
}
export interface ShipmentTo extends ShipmentLocation, ShipmentIdentifiers {
}
export interface ShipmentData extends Record<string, unknown> {
status: ShipmentStatus;
// from is optional as you might receive with no info
from?: ShipmentFrom;
// A shipment would always have a destination
to: ShipmentTo;
}
export interface Shipment extends ShipmentData {
shipmentId: string;
createdAt: string;
updatedAt: string;
}
A shipment includes any movement of inventory external to where the inventory is normally kept.
It could also just be pickup or delivery information
It might have identifier information like a tracking code.
A shipment would have a status