Skip to content

@ediocracy/parser/acknowledgements / functions

function

read999() ​

read999(transaction): Response999

Defined in: packages/parser/src/profiles/acknowledgements/999/reader.ts:235

Reads one transaction set as a 999 implementation acknowledgment under the 005010X231A1 guide.

It does not check that the transaction set is a 999.

Parameters ​

ParameterTypeDescription
transactionTransactionA transaction set from readX12, such as document.interchanges[0].groups[0].transactions[0].

Returns ​

Response999

The acknowledgment, with findings for anything that does not follow the guide.

Example ​

ts
import { readX12 } from '@ediocracy/parser';
import { read999 } from '@ediocracy/parser/acknowledgements';

const transaction = readX12(text).interchanges[0]?.groups[0]?.transactions[0];
if (transaction) {
    const response = read999(transaction);
    console.log(response.result?.code, response.transactionSets.length);
}