/** * Shipment types – GET /shipments returns orders with _p2g_ship_status = Fulfilled only. */ /** Shipping address for a shipment (lean, from list API). */ export interface ShipmentShipping { name: string; company: string; address_1: string; address_2: string; city: string; state: string; postcode: string; country: string; phone: string | null; } /** P2G metadata on a shipped order. */ export interface ShipmentP2GMeta { orderId: string; orderLineIds: string[]; bookedAt: string; courier: string; serviceName: string; serviceSlug: string; shipStatus: string; trackingNumber: string; /** True when _p2g_label_hash is set (label download available). */ hasLabelHash: boolean; /** Server: completed + P2G id + complete hash, no label hash — client may POST sync-label-hash. */ canSyncLabelHash: boolean; /** Matches quote.service.courierSlug for getCourierLogo(). */ courierSlug: string; } /** Single shipment in the list (WooCommerce order with _p2g_ship_status = Fulfilled). */ export interface Shipment { id: number; number: string; date_created: string | null; status: string; total: string; currency: string; shipping: ShipmentShipping; p2g: ShipmentP2GMeta; } /** GET /parcel2go-shipping/v1/shipments – paginated list of fulfilled shipments. */ export interface ShipmentsListResponse { shipments: Shipment[]; total: number; }