@munchi_oy/promotion-engine
v1.5.12
Published
Munchi Promotion Engine - Pure promotion rule resolution utilities
Readme
@munchi_oy/promotion-engine
Pure promotion rule resolution utilities for Munchi channels.
This package is intended to stay headless and reusable across POS, kiosk, storefront, and other consumers. It should not import React, cart-engine, persistence, network clients, or UI code.
Scope
This package will own:
- normalized promotion resolver input and output types
- condition and rule evaluation
- priority and winner resolution
- automatic promotion application plans
This package will not own:
- channel cart state
- cart mutation
- API fetching
- persistence
- activity logs
- UI rendering
Usage
import { resolvePromotions } from "@munchi_oy/promotion-engine";
const result = resolvePromotions({
promotions: [],
cart: {
currency: "EUR",
subtotalAmount: 0,
lines: [],
},
context: {
nowIso: new Date().toISOString(),
timezone: "Europe/Amsterdam",
},
});License
UNLICENSED - Private package
