@makakwastaken/ts-edifact
Version:
Edifact parser library
566 lines (565 loc) • 23.4 kB
JSON
[
{
"content": "UNH",
"mandatory": true,
"repetition": 1,
"data": ["D07A", "INVOIC"],
"section": "header"
},
{ "content": "BGM", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": true, "repetition": 35 },
{ "content": "PAI", "mandatory": false, "repetition": 1 },
{ "content": "ALI", "mandatory": false, "repetition": 5 },
{ "content": "IMD", "mandatory": false, "repetition": 1 },
{ "content": "FTX", "mandatory": false, "repetition": 99 },
{ "content": "LOC", "mandatory": false, "repetition": 10 },
{ "content": "GEI", "mandatory": false, "repetition": 10 },
{ "content": "DGS", "mandatory": false, "repetition": 1 },
{ "content": "GIR", "mandatory": false, "repetition": 10 },
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "GIR", "mandatory": false, "repetition": 5 },
{ "content": "LOC", "mandatory": false, "repetition": 2 },
{ "content": "MEA", "mandatory": false, "repetition": 5 },
{ "content": "QTY", "mandatory": false, "repetition": 2 },
{ "content": "FTX", "mandatory": false, "repetition": 5 },
{ "content": "MOA", "mandatory": false, "repetition": 2 },
{ "content": "RTE", "mandatory": false, "repetition": 99 }
],
"mandatory": false,
"repetition": 99999,
"name": "Segment group 1"
},
{
"content": [
{ "content": "NAD", "mandatory": true, "repetition": 1 },
{ "content": "LOC", "mandatory": false, "repetition": 25 },
{ "content": "FII", "mandatory": false, "repetition": 5 },
{ "content": "MOA", "mandatory": false, "repetition": 99 },
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 9999,
"name": "Segment group 3"
},
{
"content": [
{ "content": "DOC", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 4"
},
{
"content": [
{ "content": "CTA", "mandatory": true, "repetition": 1 },
{ "content": "COM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 5"
}
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 2"
},
{
"content": [
{ "content": "TAX", "mandatory": true, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 1 },
{ "content": "LOC", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 6"
},
{
"content": [
{ "content": "CUX", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 7"
},
{
"content": [
{ "content": "PYT", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "PCD", "mandatory": false, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 1 },
{ "content": "PAI", "mandatory": false, "repetition": 1 },
{ "content": "FII", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 8"
},
{
"content": [
{ "content": "TDT", "mandatory": true, "repetition": 1 },
{ "content": "TSR", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "LOC", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 10"
},
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 9999,
"name": "Segment group 11"
}
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 9"
},
{
"content": [
{ "content": "TOD", "mandatory": true, "repetition": 1 },
{ "content": "LOC", "mandatory": false, "repetition": 2 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 12"
},
{
"content": [
{ "content": "EQD", "mandatory": true, "repetition": 1 },
{ "content": "SEL", "mandatory": false, "repetition": 9 }
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 13"
},
{
"content": [
{ "content": "PAC", "mandatory": true, "repetition": 1 },
{ "content": "MEA", "mandatory": false, "repetition": 5 },
{ "content": "EQD", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "PCI", "mandatory": true, "repetition": 1 },
{ "content": "RFF", "mandatory": false, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "GIN", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 15"
}
],
"mandatory": false,
"repetition": 1000,
"name": "Segment group 14"
},
{
"content": [
{ "content": "ALC", "mandatory": true, "repetition": 1 },
{ "content": "ALI", "mandatory": false, "repetition": 5 },
{ "content": "FTX", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 17"
},
{
"content": [
{ "content": "QTY", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 18"
},
{
"content": [
{ "content": "PCD", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 19"
},
{
"content": [
{ "content": "MOA", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 },
{ "content": "CUX", "mandatory": false, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 2,
"name": "Segment group 20"
},
{
"content": [
{ "content": "RTE", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 21"
},
{
"content": [
{ "content": "TAX", "mandatory": true, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 22"
}
],
"mandatory": false,
"repetition": 9999,
"name": "Segment group 16"
},
{
"content": [
{ "content": "RCS", "mandatory": true, "repetition": 1 },
{ "content": "RFF", "mandatory": false, "repetition": 5 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "FTX", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 100,
"name": "Segment group 23"
},
{
"content": [
{ "content": "AJT", "mandatory": true, "repetition": 1 },
{ "content": "FTX", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 24"
},
{
"content": [
{ "content": "INP", "mandatory": true, "repetition": 1 },
{ "content": "FTX", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 25"
},
{
"content": [
{ "content": "LIN", "mandatory": true, "repetition": 1 },
{ "content": "PIA", "mandatory": false, "repetition": 25 },
{ "content": "PGI", "mandatory": false, "repetition": 99 },
{ "content": "IMD", "mandatory": false, "repetition": 99 },
{ "content": "MEA", "mandatory": false, "repetition": 5 },
{ "content": "QTY", "mandatory": false, "repetition": 5 },
{ "content": "PCD", "mandatory": false, "repetition": 1 },
{ "content": "ALI", "mandatory": false, "repetition": 5 },
{ "content": "DTM", "mandatory": false, "repetition": 35 },
{ "content": "GIN", "mandatory": false, "repetition": 1000 },
{ "content": "GIR", "mandatory": false, "repetition": 1000 },
{ "content": "QVR", "mandatory": false, "repetition": 1 },
{ "content": "EQD", "mandatory": false, "repetition": 1 },
{ "content": "FTX", "mandatory": false, "repetition": 99 },
{ "content": "DGS", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "MOA", "mandatory": true, "repetition": 1 },
{ "content": "CUX", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 27"
},
{
"content": [
{ "content": "PYT", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "PCD", "mandatory": false, "repetition": 99 },
{ "content": "MOA", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 28"
},
{
"content": [
{ "content": "PRI", "mandatory": true, "repetition": 1 },
{ "content": "CUX", "mandatory": false, "repetition": 1 },
{ "content": "APR", "mandatory": false, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 25,
"name": "Segment group 29"
},
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 30"
},
{
"content": [
{ "content": "PAC", "mandatory": true, "repetition": 1 },
{ "content": "MEA", "mandatory": false, "repetition": 10 },
{ "content": "EQD", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "PCI", "mandatory": true, "repetition": 1 },
{ "content": "RFF", "mandatory": false, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "GIN", "mandatory": false, "repetition": 10 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 32"
}
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 31"
},
{
"content": [
{ "content": "LOC", "mandatory": true, "repetition": 1 },
{ "content": "QTY", "mandatory": false, "repetition": 100 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 9999,
"name": "Segment group 33"
},
{
"content": [
{ "content": "TAX", "mandatory": true, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 2 },
{ "content": "LOC", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 34"
},
{
"content": [
{ "content": "NAD", "mandatory": true, "repetition": 1 },
{ "content": "LOC", "mandatory": false, "repetition": 5 },
{ "content": "FII", "mandatory": false, "repetition": 5 },
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 36"
},
{
"content": [
{ "content": "DOC", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 37"
},
{
"content": [
{ "content": "CTA", "mandatory": true, "repetition": 1 },
{ "content": "COM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 38"
}
],
"mandatory": false,
"repetition": 99,
"name": "Segment group 35"
},
{
"content": [
{ "content": "ALC", "mandatory": true, "repetition": 1 },
{ "content": "ALI", "mandatory": false, "repetition": 5 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "FTX", "mandatory": false, "repetition": 1 },
{
"content": [
{ "content": "QTY", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 40"
},
{
"content": [
{ "content": "PCD", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 41"
},
{
"content": [
{ "content": "MOA", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 },
{ "content": "CUX", "mandatory": false, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 2,
"name": "Segment group 42"
},
{
"content": [
{ "content": "RTE", "mandatory": true, "repetition": 1 },
{ "content": "RNG", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 43"
},
{
"content": [
{ "content": "TAX", "mandatory": true, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 2 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 44"
}
],
"mandatory": false,
"repetition": 30,
"name": "Segment group 39"
},
{
"content": [
{ "content": "TDT", "mandatory": true, "repetition": 1 },
{
"content": [
{ "content": "LOC", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 46"
}
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 45"
},
{
"content": [
{ "content": "TOD", "mandatory": true, "repetition": 1 },
{ "content": "LOC", "mandatory": false, "repetition": 2 }
],
"mandatory": false,
"repetition": 5,
"name": "Segment group 47"
},
{
"content": [
{ "content": "RCS", "mandatory": true, "repetition": 1 },
{ "content": "RFF", "mandatory": false, "repetition": 5 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "FTX", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 100,
"name": "Segment group 48"
},
{
"content": [
{ "content": "GEI", "mandatory": true, "repetition": 1 },
{ "content": "RFF", "mandatory": false, "repetition": 9 },
{ "content": "IMD", "mandatory": false, "repetition": 99 },
{ "content": "DTM", "mandatory": false, "repetition": 5 },
{ "content": "GIR", "mandatory": false, "repetition": 5 },
{ "content": "LOC", "mandatory": false, "repetition": 2 },
{ "content": "MEA", "mandatory": false, "repetition": 5 },
{ "content": "QTY", "mandatory": false, "repetition": 9 },
{ "content": "FTX", "mandatory": false, "repetition": 5 },
{ "content": "MOA", "mandatory": false, "repetition": 2 }
],
"mandatory": false,
"repetition": 999,
"name": "Segment group 49"
}
],
"mandatory": false,
"repetition": 9999999,
"name": "Segment group 26",
"section": "detail"
},
{
"content": "UNS",
"mandatory": true,
"repetition": 1,
"section": "summary"
},
{ "content": "CNT", "mandatory": false, "repetition": 10 },
{
"content": [
{ "content": "MOA", "mandatory": true, "repetition": 1 },
{
"content": [
{ "content": "RFF", "mandatory": true, "repetition": 1 },
{ "content": "DTM", "mandatory": false, "repetition": 5 }
],
"mandatory": false,
"repetition": 1,
"name": "Segment group 51"
}
],
"mandatory": true,
"repetition": 100,
"name": "Segment group 50"
},
{
"content": [
{ "content": "TAX", "mandatory": true, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 9 }
],
"mandatory": false,
"repetition": 10,
"name": "Segment group 52"
},
{
"content": [
{ "content": "ALC", "mandatory": true, "repetition": 1 },
{ "content": "ALI", "mandatory": false, "repetition": 1 },
{ "content": "MOA", "mandatory": false, "repetition": 2 },
{ "content": "FTX", "mandatory": false, "repetition": 1 }
],
"mandatory": false,
"repetition": 15,
"name": "Segment group 53"
},
{ "content": "UNT", "mandatory": true, "repetition": 1 }
]