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; orphanSegments holds any segment that fell outside every
transaction set (empty for a well-formed interchange); 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
readonlydelimiters:Delimiters
groups
readonlygroups: readonlyX12FunctionalGroup[]
iea
readonlyiea:IeaSegment|undefined
isa
readonlyisa:IsaSegment
orphanSegments
readonlyorphanSegments: readonlyX12OrphanSegment[]
Segments the envelope grammar could not place, in input order - almost
always because they fell outside every ST..SE transaction set, plus the
TA1-inside-a-group case, which is lifted out of the transaction it
arrived in. Empty for a well-formed interchange. See
X12OrphanSegment.
profile?
readonlyoptionalprofile?: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
readonlyta1Segments: readonlyTa1Segment[]
trailingBytes?
readonlyoptionaltrailingBytes?:string
warnings
readonlywarnings: readonlyX12ParseWarning[]