export type SupplierShipmentStatus =
  | "draft"
  | "ready"
  | "dispatched"
  | "in_transit"
  | "arrived"
  | "linked_to_receiving"
  | "closed"
  | "cancelled"

export type SupplierShipment = {
  id: string
  shipment_no: string
  purchase_order_id: string | null
  supplier_id: string | null
  status: SupplierShipmentStatus
  shipped_weight_grams: string
  bar_count: number
  carrier_name: string | null
  tracking_no: string | null
  insurance_provider: string | null
  insurance_policy_no: string | null
  shipping_cost: string
  expected_arrival_date: string | null
  dispatched_at: string | null
  arrived_at: string | null
  closed_at: string | null
  cancelled_at: string | null
  target_vault_id: string | null
  receiving_order_id: string | null
  notes: string | null
  created_by: string | null
  created_at: string
  updated_at: string
}

export type SupplierShipmentCreatePayload = {
  purchase_order_id?: string
  supplier_id?: string
  shipped_weight_grams?: number
  bar_count?: number
  carrier_name?: string
  tracking_no?: string
  insurance_provider?: string
  insurance_policy_no?: string
  shipping_cost?: number
  expected_arrival_date?: string
  target_vault_id?: string
  notes?: string
}

export type SupplierShipmentUpdatePayload = Partial<SupplierShipmentCreatePayload>

export type SupplierShipmentFilters = {
  page?: number
  page_size?: number
  search?: string
  status_filter?: string
  supplier_id?: string
  purchase_order_id?: string
}