Skip to main content
Version: v0.0.2

Interface: Build277EnvelopeSpec

Interchange + group + transaction identity for the built 277 / 277CA. Mirrors the "../remit/build-835-types.js".Build835EnvelopeSpec; the builder fixes GS-01 to "HN" and ST-01 to "277". ST-03 / GS-08 are the version supplied by the builder entry point (005010X212 for "./build-277.js".build277, 005010X214 for "./build-277.js".build277CA) so the caller never hand-codes them.

Example

import type { Build277EnvelopeSpec } from "@cosyte/x12";
const env: Build277EnvelopeSpec = {
senderId: "MEDPAY", receiverId: "PROVIDER",
interchangeDate: "260601", interchangeTime: "1200",
interchangeControlNumber: "000000001",
groupControlNumber: "1", transactionSetControlNumber: "0001",
};

Properties

applicationReceiverCode?

readonly optional applicationReceiverCode?: string

GS-03 - application receiver code. Default: the interchange receiver id.


applicationSenderCode?

readonly optional applicationSenderCode?: string

GS-02 - application sender code. Default: the interchange sender id.


componentSeparator?

readonly optional componentSeparator?: string

Component (sub-element) separator (ISA-16). Default ":".


elementSeparator?

readonly optional elementSeparator?: string

Element separator (ISA byte 4). Default "*".


groupControlNumber

readonly groupControlNumber: string

GS-06 / GE-02 - group control number.


groupDate?

readonly optional groupDate?: string

GS-04 - group date CCYYMMDD. Default: century-expanded ISA-09.


groupTime?

readonly optional groupTime?: string

GS-05 - group time HHMM. Default: the interchange time.


interchangeControlNumber

readonly interchangeControlNumber: string

ISA-13 / IEA-02 - interchange control number (zero-padded to 9 on emit).


interchangeDate

readonly interchangeDate: string

ISA-09 - interchange date YYMMDD.


interchangeTime

readonly interchangeTime: string

ISA-10 - interchange time HHMM.


receiverId

readonly receiverId: string

ISA-08 - interchange receiver id (padded to 15 on emit).


receiverQualifier?

readonly optional receiverQualifier?: string

ISA-07 - interchange receiver qualifier. Default "ZZ".


repetitionSeparator?

readonly optional repetitionSeparator?: string

Repetition separator (ISA-11). Default "^".


segmentTerminator?

readonly optional segmentTerminator?: string

Segment terminator (ISA byte 106). Default "~".


senderId

readonly senderId: string

ISA-06 - interchange sender id (padded to 15 on emit).


senderQualifier?

readonly optional senderQualifier?: string

ISA-05 - interchange sender qualifier. Default "ZZ".


transactionSetControlNumber

readonly transactionSetControlNumber: string

ST-02 / SE-02 - transaction set control number.


usageIndicator?

readonly optional usageIndicator?: string

ISA-15 - usage indicator (P production, T test). Default "P".