Interface: X12ProfileQuirk
A single trading-partner deviation captured by a profile. Every quirk is
fixture-grounded: fixture points at a real Tier-2 corpus file that
demonstrates the deviation, and sourceCategory records where the quirk
was observed. This is the locked hard rule - a quirk without a
demonstrating fixture is forbidden, enforced both by this required field
and by the accuracy test.
Example
import type { X12ProfileQuirk } from "@cosyte/x12";
const quirk: X12ProfileQuirk = {
id: "payer-loop-ref-2u",
effect: "adds",
summary: "Payer Loop 1000A carries a REF*2U additional payer identifier.",
fixture: "remit/835-availity-quirk.edi",
sourceCategory: "Availity 835 ERA companion guide - payer-loop REF",
};
Properties
effect
readonlyeffect:X12ProfileEffect
Which describe() bucket this quirk renders into.
expectedWarnings?
readonlyoptionalexpectedWarnings?: readonlyX12WarningCode[]
Warning codes this quirk leads a consumer to EXPECT when the deviation
is present. Drives partitionWarnings. Often empty: the lenient parser
absorbs most corpus deviations with zero warnings, and that "lossless,
no warning" outcome is itself the documented behavior.
fixture
readonlyfixture:string
Path to the Tier-2 fixture demonstrating the deviation, relative to
test/fixtures/ (e.g. "remit/835-availity-quirk.edi"). REQUIRED - the
locked hard rule. The accuracy test parses this file and asserts the
claimed deviation is present.
id
readonlyid:string
Stable, kebab-case identifier - unique within a profile's quirk set.
sourceCategory
readonlysourceCategory:string
Where the deviation was observed (companion guide / corpus category).
summary
readonlysummary:string
One-line human summary. NEVER contains PHI - describes structure only.