SHOWN IN Node / JavaScript
import { pack } from '@packvium/engine';
const request = {
items: [
{ id: 'mug', quantity: 6, weight: '350 g',
dimensions: { length: '110', width: '110', height: '95' } },
{ id: 'tin', quantity: 8, weight: '500 g',
dimensions: { length: '90', width: '90', height: '120' } },
{ id: 'floor-lamp', quantity: 1, weight: '4 kg',
dimensions: { length: '1500', width: '250', height: '250' } },
],
containers: [
{ id: 'box', cost_minor: 210, max_payload: '20 kg',
inner_dimensions: { length: '450', width: '350', height: '350' } },
],
};
const result = pack(request);
console.log(result.status, result.containers.length, 'container(s) opened');
WHAT COMES BACK
One container opens and both mug and tin fully place inside it. The floor lamp does not: it comes back among the unpacked items with no_compatible_container_dimensions, proven - the box is simply too short for it in any rotation, which is a different fact from 'the box is full'.