Interface: Build278EnvelopeSpec
Interchange + group + transaction identity for the built 278. The builder
fixes GS-01 to "HI" and ST-01 to "278"; ST-03 / GS-08 is the version
supplied by the entry point (005010X217 for "./build-278.js".build278Request, 005010X216 for "./build-278.js".build278Response) so the caller never hand-codes them.
Example
import type { Build278EnvelopeSpec } from "@cosyte/x12";
const env: Build278EnvelopeSpec = {
senderId: "SUBMITTER", receiverId: "UMOPAYER",
interchangeDate: "260601", interchangeTime: "1200",
interchangeControlNumber: "000000001",
groupControlNumber: "1", transactionSetControlNumber: "0001",
};
Properties
applicationReceiverCode?
readonlyoptionalapplicationReceiverCode?:string
GS-03 - application receiver code. Default: the interchange receiver id.
applicationSenderCode?
readonlyoptionalapplicationSenderCode?:string
GS-02 - application sender code. Default: the interchange sender id.
componentSeparator?
readonlyoptionalcomponentSeparator?:string
Component (sub-element) separator (ISA-16). Default ":".
elementSeparator?
readonlyoptionalelementSeparator?:string
Element separator (ISA byte 4). Default "*".
groupControlNumber
readonlygroupControlNumber:string
GS-06 / GE-02 - group control number.
groupDate?
readonlyoptionalgroupDate?:string
GS-04 - group date CCYYMMDD. Default: century-expanded ISA-09.
groupTime?
readonlyoptionalgroupTime?:string
GS-05 - group time HHMM. Default: the interchange time.
interchangeControlNumber
readonlyinterchangeControlNumber:string
ISA-13 / IEA-02 - interchange control number (zero-padded to 9 on emit).
interchangeDate
readonlyinterchangeDate:string
ISA-09 - interchange date YYMMDD.
interchangeTime
readonlyinterchangeTime:string
ISA-10 - interchange time HHMM.
receiverId
readonlyreceiverId:string
ISA-08 - interchange receiver id (padded to 15 on emit).
receiverQualifier?
readonlyoptionalreceiverQualifier?:string
ISA-07 - interchange receiver qualifier. Default "ZZ".
repetitionSeparator?
readonlyoptionalrepetitionSeparator?:string
Repetition separator (ISA-11). Default "^".
segmentTerminator?
readonlyoptionalsegmentTerminator?:string
Segment terminator (ISA byte 106). Default "~".
senderId
readonlysenderId:string
ISA-06 - interchange sender id (padded to 15 on emit).
senderQualifier?
readonlyoptionalsenderQualifier?:string
ISA-05 - interchange sender qualifier. Default "ZZ".
transactionSetControlNumber
readonlytransactionSetControlNumber:string
ST-02 / SE-02 - transaction set control number.
usageIndicator?
readonlyoptionalusageIndicator?:string
ISA-15 - usage indicator (P production, T test). Default "P".