Kaizen
Browse modulesPricingpricing/sharedTypes

Type Alias: EvaluatePricingContext

type EvaluatePricingContext = {
  line_items: LineItemContext[];
  order?: OrderContext;
  timezone?: string;
};

Defined in: shared/pricing/types/context.ts:74

Context handed to evaluatePricing. The function is generic on TContext extends EvaluatePricingContext, so consumers can pass any shape that's a superset of this contract — additional fields on order, on each line item, or at the top level are preserved through inference and stay accessible in the matched-rules result.

timezone is optional because it's only consulted by time-aware conditions (DATE_WINDOW, DATE_INCLUDES, etc.) and by the default sub-unit enumerator's calendar stepping. Consumers that don't author such rules can omit it; consumers that do should provide an IANA zone name (e.g. "America/New_York").

Properties

line_items

line_items: LineItemContext[];

Defined in: shared/pricing/types/context.ts:76


order?

optional order?: OrderContext;

Defined in: shared/pricing/types/context.ts:75


timezone?

optional timezone?: string;

Defined in: shared/pricing/types/context.ts:77

On this page