getOrderGroupsListWorkflow that returns groups with their
aggregated child orders and a total count for pagination.
Run the workflow
src/api/custom/order-groups/route.ts
{ rows, metadata }, where metadata carries the count,
skip, and take you need to drive pagination.
Filters go inside
variables: the group repository understands id,
customer_id, seller_id, status, sales_channel_id, created_at,
updated_at, and a free-text q (matched against group id and customer id).Scope to a seller
Pass asellerId to get a vendor’s slice. The workflow filters each group’s
child orders down to that seller, so vendors only ever see their own orders
within a group.