Interface LineItemMergeSettings

Top-level settings object injected into the Line-item merger.

interface LineItemMergeSettings {
    baselinePriority?: VirtualDocumentType[];
    earlyReturn?: VirtualDocumentType[];
    fields?: Record<string, MergeFieldRule>;
    mergeSources?: VirtualDocumentType[];
    mode?: MergeMode;
    reducers?: Record<string, string>;
}

Properties

baselinePriority?: VirtualDocumentType[]

Ordered list; the first type that actually exists in the documents becomes the baseline "container" set.

earlyReturn?: VirtualDocumentType[]

Document types that, if present with items, short-circuit the merge and are returned verbatim (replaces hard-coded early returns).

fields?: Record<string, MergeFieldRule>

Per-field rules – if a field is absent here, default precedence applies.

mergeSources?: VirtualDocumentType[]

Document types that may supply candidates to merge into baseline. If omitted, the implementation uses its internal default list.

mode?: MergeMode

Default = 'legacy' if omitted.

reducers?: Record<string, string>

Optional map for custom reducer ids → implementation name (future).