@cosyte/x12 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - ab10959: The README now has Documentation, Support, and Security sections, says CI tests Node.js 22, 24, and 26, and links the full documentation on docs.cosyte.com. No code changes.
8
+
3
9
  ## 0.1.3
4
10
 
5
11
  ### Patch Changes
@@ -276,7 +276,7 @@ model.
276
276
  `X12_837_UNKNOWN_VARIANT` accused a document that was not non-conformant. The reader now recognises
277
277
  each base guide and each of its published errata. Sources for every key are named beside the table
278
278
  in `src/transactions/claim/get-837.ts` and in
279
- `documentation/agent-notes/x12-variant-icr-ungrounded.md`.
279
+ `documentation/agent-notes.md#x12---grounding-variant_by_icr-x12-variant-icr-ungrounded-2026-08-08`.
280
280
  - **🛑 What this changes for a consumer, and it is a behaviour change on already-published
281
281
  decoding.** On a file whose `ST-03` is now recognised: `submission.variant` can differ from what
282
282
  `0.0.13` read, where the first `SVx` in the body disagreed with the declaration; and
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  [![npm version](https://img.shields.io/npm/v/@cosyte/x12.svg)](https://www.npmjs.com/package/@cosyte/x12)
13
13
  [![CI](https://img.shields.io/github/actions/workflow/status/cosyte/x12/ci.yml?branch=main&label=CI)](https://github.com/cosyte/x12/actions/workflows/ci.yml)
14
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/cosyte/x12/blob/main/LICENSE)
15
- [![Node](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](https://nodejs.org)
15
+ [![Node](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)
16
16
 
17
17
  Developer-focused ASC X12 healthcare EDI parser, serializer, and builder for Node.js and TypeScript: lenient on parse, spec-clean on emit.
18
18
 
@@ -36,12 +36,13 @@ a stable code instead of failing or guessing.
36
36
  On the 0.1 line the public API is settled and safe to depend on: the exported readers, builders,
37
37
  types and warning codes are the surface we keep stable, and the warning registry only ever gains
38
38
  codes. Below 1.0 a breaking change bumps the minor version and is called out in the changelog with
39
- its migration. On an older 0.0 release, pin an exact version rather than a range. Typed read and typed
40
- emit both ship for every transaction set
41
- this package covers: 270, 271, 276, 277 and 277CA, 278 request and response, 820, 834, 835, 837P,
42
- 837I and 837D, 999 and TA1, each with a reader and a matching domain builder, and the two claims
43
- attachments guides 45 CFR 162.2002 adopts for the period on and after 26 May 2028: the 277 request
44
- for additional information (`006020X313`) and the 275 that answers it (`006020X314`). For those two the base X12 006020
39
+ its migration. On an older 0.0 release, pin an exact version rather than a range.
40
+
41
+ Typed read and typed emit both ship for every transaction set this package covers: 270, 271, 276,
42
+ 277 and 277CA, 278 request and response, 820, 834, 835, 837P, 837I and 837D, 999 and TA1, each
43
+ with a reader and a matching domain builder, and the two claims attachments guides 45 CFR 162.2002
44
+ adopts for the period on and after May 26, 2028: the 277 request for additional information
45
+ (`006020X313`) and the 275 that answers it (`006020X314`). For those two the base X12 006020
45
46
  structure is typed and no implementation-guide usage is checked, so a qualifier or segment the
46
47
  guide requires is carried as sent and never validated; `KNOWN-LIMITATIONS.md` lists what else
47
48
  they leave open. `X12_TR3_CONFORMANCE` is the machine-readable answer to which implementation
@@ -60,10 +61,9 @@ pnpm add @cosyte/x12
60
61
 
61
62
  `npm install @cosyte/x12` and `yarn add @cosyte/x12` work the same way.
62
63
 
63
- Node.js 22 or later, tested on 22 and 24: the engine floor is `>=22.0.0`, and there are zero
64
- runtime dependencies. The package ships
65
- dual ESM and CJS builds with type declarations for both conditions, so `import` and `require` each
66
- resolve to the artifact meant for them.
64
+ Node.js 22 or later, tested on 22, 24, and 26: the engine floor is `>=22.0.0`, and there are zero
65
+ runtime dependencies. The package ships dual ESM and CJS builds with type declarations for both
66
+ conditions, so `import` and `require` each resolve to the artifact meant for them.
67
67
 
68
68
  ## Usage
69
69
 
@@ -140,38 +140,6 @@ warnings 0
140
140
  The `groupCode` is what tells you who owes the money (`PR` patient responsibility, `CO` contractual
141
141
  obligation, and so on). Read it; never infer it.
142
142
 
143
- ## PHI and safety
144
-
145
- X12 healthcare transactions carry protected health information, so treat every interchange you hand
146
- this library as PHI.
147
-
148
- **What it does with your document.** It decodes it in memory and nothing else. No socket is opened,
149
- nothing is written to disk, and nothing is fetched at run time: the bundled code lists are versioned
150
- data snapshots, so updating one is a release rather than a network call. The acknowledgment builders
151
- are pure functions and never auto-send.
152
-
153
- **What it keeps out of diagnostics.** A warning `message` is a lookup into a frozen registry rather
154
- than something built from your document, and no warning factory in this library takes a value
155
- parameter, so no element of yours can reach a diagnostic. The code and the `position` say what and
156
- where; the bytes stay on the model. `ALL_WARNING_MESSAGES` is exported so you can assert that.
157
-
158
- **The one deliberate exception.** `X12ParseError.snippet` on the four structural fatals is a bounded
159
- copy of the start of the input, so on real traffic it can carry PHI, and it is not redacted. Log
160
- `err.code` and `err.position` instead, or redact at your call site.
161
-
162
- **An attachment refuses to print.** The data of each BDS a 275 carries is read into
163
- `X12AttachmentData`, whose string, JSON, and `util.inspect` forms state its octet count and nothing
164
- else; `readOctets()` is the one route to the octets.
165
-
166
- **Builder refusals are a weaker surface, deliberately.** A `build*` refusal names the control
167
- number, count, or code you passed in, so that you can see what was refused. The rendered fragment is
168
- bounded by an exported constant, but it is bounded rather than redacted. The two attachments
169
- builders are the exception and name no value at all. Log `err.code`, not `err.message`, from a
170
- builder.
171
-
172
- **What you still own.** Transport, storage, retention, access control, audit logging, and every log
173
- line your own code writes. This library makes no HIPAA compliance claim on your behalf.
174
-
175
143
  ## API
176
144
 
177
145
  Everything ships from one entry point; there are no subpath imports.
@@ -283,17 +251,83 @@ A namespace import works too: `import * as x12 from "@cosyte/x12"`, then `x12.to
283
251
  breaks" is not sufficient either. [KNOWN-LIMITATIONS.md](./KNOWN-LIMITATIONS.md) is the canonical
284
252
  list.
285
253
 
254
+ ## Documentation
255
+
256
+ The full documentation lives at [docs.cosyte.com/x12](https://docs.cosyte.com/x12), built from this
257
+ repository's [`docs-content/`](https://github.com/cosyte/x12/tree/main/docs-content). Start with
258
+ these pages:
259
+
260
+ - [Quickstart](https://github.com/cosyte/x12/blob/main/docs-content/quickstart.md): read an 835
261
+ and pull out the payment, each claim's money, and the adjustment reasons.
262
+ - [The 80/20 transaction sets](https://github.com/cosyte/x12/blob/main/docs-content/spec-notes-transaction-sets.md):
263
+ every transaction set this package covers, with its reader and its builder.
264
+ - [Decimal-exact money](https://github.com/cosyte/x12/blob/main/docs-content/spec-notes-money.md):
265
+ why every amount is an `X12Decimal` and never a JavaScript number.
266
+ - [Building and serializing X12](https://github.com/cosyte/x12/blob/main/docs-content/emit-and-serialize.md):
267
+ the emit side, from `serializeX12` to the domain builders.
268
+ - [Cookbook](https://github.com/cosyte/x12/blob/main/docs-content/cookbook.md): recipes for the
269
+ transactions you get handed, each with the code and what comes back.
270
+ - [Troubleshooting](https://github.com/cosyte/x12/blob/main/docs-content/troubleshooting.md): the
271
+ error model, the common symptoms, and the boundaries this package states on purpose.
272
+
273
+ ## Support
274
+
275
+ Questions and ideas go to [Discussions](https://github.com/cosyte/.github/discussions), which
276
+ covers every Cosyte repository. Bug reports and trading-partner quirks go to the
277
+ [issue tracker](https://github.com/cosyte/x12/issues), with a synthetic reproduction and never a
278
+ real interchange. The organization's
279
+ [support guide](https://github.com/cosyte/.github/blob/main/SUPPORT.md) has the rest.
280
+
281
+ ## Security
282
+
283
+ Report a vulnerability privately, as the
284
+ [security policy](https://github.com/cosyte/.github/blob/main/SECURITY.md) describes, never in a
285
+ public issue.
286
+
287
+ ## PHI and safety
288
+
289
+ X12 healthcare transactions carry protected health information, so treat every interchange you hand
290
+ this library as PHI.
291
+
292
+ **What it does with your document.** It decodes it in memory and nothing else. No socket is opened,
293
+ nothing is written to disk, and nothing is fetched at run time: the bundled code lists are versioned
294
+ data snapshots, so updating one is a release rather than a network call. The acknowledgment builders
295
+ are pure functions and never auto-send.
296
+
297
+ **What it keeps out of diagnostics.** A warning `message` is a lookup into a frozen registry rather
298
+ than something built from your document, and no warning factory in this library takes a value
299
+ parameter, so no element of yours can reach a diagnostic. The code and the `position` say what and
300
+ where; the bytes stay on the model. `ALL_WARNING_MESSAGES` is exported so you can assert that.
301
+
302
+ **The one deliberate exception.** `X12ParseError.snippet` on the four structural fatals is a bounded
303
+ copy of the start of the input, so on real traffic it can carry PHI, and it is not redacted. Log
304
+ `err.code` and `err.position` instead, or redact at your call site.
305
+
306
+ **An attachment refuses to print.** The data of each BDS a 275 carries is read into
307
+ `X12AttachmentData`, whose string, JSON, and `util.inspect` forms state its octet count and nothing
308
+ else; `readOctets()` is the one route to the octets.
309
+
310
+ **Builder refusals are a weaker surface, deliberately.** A `build*` refusal names the control
311
+ number, count, or code you passed in, so that you can see what was refused. The rendered fragment is
312
+ bounded by an exported constant, but it is bounded rather than redacted. The two attachments
313
+ builders are the exception and name no value at all. Log `err.code`, not `err.message`, from a
314
+ builder.
315
+
316
+ **What you still own.** Transport, storage, retention, access control, audit logging, and every log
317
+ line your own code writes. This library makes no HIPAA compliance claim on your behalf.
318
+
286
319
  ## Contributing
287
320
 
288
- Questions, bug reports, and trading-partner quirks all belong in
289
- [GitHub issues](https://github.com/cosyte/x12/issues).
321
+ Bug reports and trading-partner quirks belong in
322
+ [GitHub issues](https://github.com/cosyte/x12/issues), as Support says above.
290
323
 
291
324
  Pull requests are welcome. The organization's
292
325
  [contributing guide](https://github.com/cosyte/.github/blob/main/CONTRIBUTING.md) and
293
- [code of conduct](https://github.com/cosyte/.github/blob/main/CODE_OF_CONDUCT.md) apply here. A contribution must clear `pnpm typecheck`, `pnpm lint`, and `pnpm test`,
294
- hold the per-directory coverage floors, pass the PHI commit gate (`pnpm phi-scan`) and the prose
295
- gates (`pnpm check:no-emdash`, `pnpm check:no-internal-refs`), and carry a changeset. Every fixture
296
- must be synthetic: never open a pull request carrying a real patient's data.
326
+ [code of conduct](https://github.com/cosyte/.github/blob/main/CODE_OF_CONDUCT.md) apply here. A
327
+ contribution must clear `pnpm typecheck`, `pnpm lint`, and `pnpm test`, hold the per-directory
328
+ coverage floors, pass the PHI commit gate (`pnpm phi-scan`) and the prose gates
329
+ (`pnpm check:no-emdash`, `pnpm check:no-internal-refs`), and carry a changeset. Every fixture must
330
+ be synthetic: never open a pull request carrying a real patient's data.
297
331
 
298
332
  ## Trademarks
299
333
 
package/dist/index.cjs CHANGED
@@ -15395,7 +15395,7 @@ var profiles = Object.freeze({
15395
15395
  });
15396
15396
 
15397
15397
  // src/index.ts
15398
- var VERSION = "0.1.3";
15398
+ var VERSION = "0.1.4";
15399
15399
 
15400
15400
  exports.AAA_CONDITION_LEVELS = AAA_CONDITION_LEVELS;
15401
15401
  exports.AAA_FOLLOW_UP_ACTION_CODES = AAA_FOLLOW_UP_ACTION_CODES;