Status List Functions
Retrieve all registered statuses from the OMS configuration.
Import
import {
getOrderStatusList,
getPaymentStatusList,
getShipmentStatusList
} from '@evershop/evershop/oms/services';
Functions
getOrderStatusList
getOrderStatusList(): Record<string, OrderStatus>
Returns all registered order statuses.
getPaymentStatusList
getPaymentStatusList(): Record<string, PaymentStatus>
Returns all registered payment statuses.
getShipmentStatusList
getShipmentStatusList(): Record<string, ShipmentStatus>
Returns all registered per-shipment statuses.
ShipmentStatus is now { name, badge, phase } — isDefault and isCancelable were removed. phase is one of 'shipped' | 'delivered' | 'canceled' and is required on every entry.
import { getShipmentStatusList } from '@evershop/evershop/oms/services';
const statuses = getShipmentStatusList();
// {
// shipped: { name: 'Shipped', badge: 'warning', phase: 'shipped' },
// delivered: { name: 'Delivered', badge: 'success', phase: 'delivered' },
// canceled: { name: 'Canceled', badge: 'destructive', phase: 'canceled' }
// }
Order.shipmentStatusThis registry describes the status of an individual shipment row. The order-level order.shipment_status holds a rollup derived from all of the order's shipments — pending, partially_shipped, shipped, partially_delivered, delivered, partially_canceled, canceled. Those rollup values are not registered here and have no phase; their display name and badge come from getRollupDisplay() (overridable with addProcessor('rollupDisplay', …)). Looking a rollup value up in getShipmentStatusList() returns undefined for the partially_* cases.
import { getRollupDisplay } from '@evershop/evershop/oms/services';
const display = getRollupDisplay();
console.log(display.partially_shipped); // { name: 'Partially Shipped', badge: 'warning' }
Examples
import { getPaymentStatusList } from '@evershop/evershop/oms/services';
const statuses = getPaymentStatusList();
// {
// pending: { name: 'Pending', badge: 'default', isDefault: true, isCancelable: true },
// paid: { name: 'Paid', badge: 'success', isCancelable: false },
// ...
// }