Skip to main content
Version: v0.0.2

Interface: X12Interchange

The top-level X12 interchange returned by parseX12. isa carries the envelope header verbatim; delimiters is the four-class delimiter set detected from fixed positions inside isa.raw; groups is the ordered GS..GE list; warnings accumulates every Tier-2 deviation observed during the parse (lenient mode); trailingBytes (when present) is any non-empty content after IEA - preserved verbatim so a consumer can inspect or re-emit it.

Example

import { parseX12 } from "@cosyte/x12";
const ix = parseX12(raw);
for (const w of ix.warnings) console.warn(w.code, w.position);

Properties

delimiters

readonly delimiters: Delimiters


groups

readonly groups: readonly X12FunctionalGroup[]


iea

readonly iea: IeaSegment | undefined


isa

readonly isa: IsaSegment


profile?

readonly optional profile?: X12Profile

The trading-partner X12Profile in effect for this parse, if any - either passed explicitly via options.profile or resolved from the process-scoped default. Present only when a profile applied; used for attribution and as the partition basis for partitionWarnings.


ta1Segments

readonly ta1Segments: readonly Ta1Segment[]


trailingBytes?

readonly optional trailingBytes?: string


warnings

readonly warnings: readonly X12ParseWarning[]