@flaks/onerecord 0.1.2 → 0.2.0
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 +215 -5
- package/MIGRATING.md +77 -5
- package/README.md +62 -10
- package/dist/booking-flow/index.d.ts +1 -1
- package/dist/booking-flow/index.d.ts.map +1 -1
- package/dist/booking-flow/index.js +1 -1
- package/dist/booking-flow/index.js.map +1 -1
- package/dist/booking-flow/transitions.d.ts +21 -0
- package/dist/booking-flow/transitions.d.ts.map +1 -1
- package/dist/booking-flow/transitions.js +57 -5
- package/dist/booking-flow/transitions.js.map +1 -1
- package/dist/codes/fsu-event-codes.d.ts +6 -6
- package/dist/codes/fsu-event-codes.d.ts.map +1 -1
- package/dist/codes/fsu-event-codes.js +11 -9
- package/dist/codes/fsu-event-codes.js.map +1 -1
- package/dist/dispatch/context-order.d.ts +28 -0
- package/dist/dispatch/context-order.d.ts.map +1 -0
- package/dist/dispatch/context-order.js +21 -0
- package/dist/dispatch/context-order.js.map +1 -0
- package/dist/dispatch/domain-constraints.d.ts +44 -0
- package/dist/dispatch/domain-constraints.d.ts.map +1 -0
- package/dist/dispatch/domain-constraints.js +69 -0
- package/dist/dispatch/domain-constraints.js.map +1 -0
- package/dist/dispatch/field-types.d.ts +30 -0
- package/dist/dispatch/field-types.d.ts.map +1 -0
- package/dist/dispatch/field-types.js +88 -0
- package/dist/dispatch/field-types.js.map +1 -0
- package/dist/dispatch/graph-walk.d.ts +23 -0
- package/dist/dispatch/graph-walk.d.ts.map +1 -0
- package/dist/dispatch/graph-walk.js +206 -0
- package/dist/dispatch/graph-walk.js.map +1 -0
- package/dist/dispatch/index.d.ts +30 -0
- package/dist/dispatch/index.d.ts.map +1 -0
- package/dist/dispatch/index.js +36 -0
- package/dist/dispatch/index.js.map +1 -0
- package/dist/dispatch/iri-canonical.d.ts +28 -0
- package/dist/dispatch/iri-canonical.d.ts.map +1 -0
- package/dist/dispatch/iri-canonical.js +55 -0
- package/dist/dispatch/iri-canonical.js.map +1 -0
- package/dist/error/format.d.ts.map +1 -1
- package/dist/error/format.js +8 -0
- package/dist/error/format.js.map +1 -1
- package/dist/facade.d.ts +42 -0
- package/dist/facade.d.ts.map +1 -1
- package/dist/facade.js +8 -0
- package/dist/facade.js.map +1 -1
- package/dist/factory.d.ts +12 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +10 -1
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/iri/dereference.d.ts +42 -0
- package/dist/iri/dereference.d.ts.map +1 -0
- package/dist/iri/dereference.js +75 -0
- package/dist/iri/dereference.js.map +1 -0
- package/dist/result.d.ts +27 -1
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +9 -0
- package/dist/result.js.map +1 -1
- package/dist/safety/blank-node.d.ts +20 -0
- package/dist/safety/blank-node.d.ts.map +1 -0
- package/dist/safety/blank-node.js +59 -0
- package/dist/safety/blank-node.js.map +1 -0
- package/dist/safety/pre-validate.d.ts.map +1 -1
- package/dist/safety/pre-validate.js +12 -72
- package/dist/safety/pre-validate.js.map +1 -1
- package/dist/safety/walk-graph.d.ts +30 -0
- package/dist/safety/walk-graph.d.ts.map +1 -0
- package/dist/safety/walk-graph.js +100 -0
- package/dist/safety/walk-graph.js.map +1 -0
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,221 @@ All notable changes are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/), versioning follows
|
|
5
5
|
[SemVer](https://semver.org/) per the policy in `MIGRATING.md`.
|
|
6
6
|
|
|
7
|
-
## [0.
|
|
8
|
-
|
|
9
|
-
First
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
## [0.2.0] - 2026-04-28
|
|
8
|
+
|
|
9
|
+
First publicly verifiable release. Closes 3 of 5 v0.1.x spec
|
|
10
|
+
deviations PLUS pulls forward 5 of the 6 newly-identified deviations
|
|
11
|
+
(#6 partially, #7, #8, #9, #10) for net 7 of 11 deviations CLOSED
|
|
12
|
+
or PARTIAL in v0.2.0. Adds 4 new opt-in `ParseError.kind` values
|
|
13
|
+
that fire only through the dispatch path; default per-class
|
|
14
|
+
deserializers stay v0.1.x-permissive (no breaking changes).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`acceptBookingOptionViaRequest(opt)`** — spec §5.4-correct booking
|
|
19
|
+
transition that returns the intermediate `BookingOptionRequest` state
|
|
20
|
+
instead of jumping straight to `Booking`. Closes deviation #1
|
|
21
|
+
partially (forwarder→carrier hop only; carrier-side acceptance flow
|
|
22
|
+
is v0.3 work).
|
|
23
|
+
- **Graph-walk dispatcher** — opt-in cross-node integrity validation
|
|
24
|
+
via `createMapper({ graphWalk: true })` or
|
|
25
|
+
`onerecord.dispatch.deserialize.<Class>`. Emits all four reserved
|
|
26
|
+
ParseError kinds: `duplicate_id_in_graph`, `missing_id`,
|
|
27
|
+
`wrong_type_for_endpoint`, `missing_type`. Default per-class
|
|
28
|
+
deserializers unchanged. Closes deviation #2 for JSON-LD structural
|
|
29
|
+
integrity (domain-semantic checks remain deviation #6, deferred).
|
|
30
|
+
- **`walkGraph` helper** at `src/safety/walk-graph.ts` — visitor-pattern
|
|
31
|
+
recursive walker shared by `preValidate` and `dispatchGraphWalk`.
|
|
32
|
+
Single traversal, no double-walk overhead.
|
|
33
|
+
- **`FIELD_TYPES` map** at `src/dispatch/field-types.ts` — covers all
|
|
34
|
+
32 cargo classes with field-to-expected-type mappings; polymorphic
|
|
35
|
+
fields marked `'*'`.
|
|
36
|
+
- **Property-based round-trip tests** for the 7 remaining Ring 1+2
|
|
37
|
+
classes (Shipment, Piece, Address, Person, Organization, Party,
|
|
38
|
+
AccountNumber). Joins the existing Waybill test. Total runtime ~1.6s.
|
|
39
|
+
- **`PARSE_ERROR_KINDS.length === 26` lock test** — fails CI on
|
|
40
|
+
unexpected union drift. Bumped from 22 in v0.1.x with four new
|
|
41
|
+
kinds: `blank_node_forbidden` (#8), `iri_not_canonical` (#9),
|
|
42
|
+
`context_order_violation` (#10), `domain_constraint_violation` (#6).
|
|
43
|
+
- **Contract test harness + 6 contract tests** at `test/contract/`
|
|
44
|
+
against the OLF-hosted reference NE:ONE Server. All 6 plan-specified
|
|
45
|
+
topics shipped: Waybill, Shipment, Piece, booking-flow, operations
|
|
46
|
+
(JSON-Patch via applyChange), notification (Subscription LO + endpoint
|
|
47
|
+
smoke). Includes Keycloak auth + defensive RDF-strict-mode
|
|
48
|
+
wire-format adapter (envelope shape, ObjectProperty `@id` wrapping,
|
|
49
|
+
xsd-typed literals, `@graph` response unwrap). Excluded from the
|
|
50
|
+
default `bun run test`; run via `bun run test:contract` after
|
|
51
|
+
starting the local NE:ONE stack.
|
|
52
|
+
- **Skeleton bundled docker-compose** at `test/contract/docker-compose.neone.yml`
|
|
53
|
+
for in-memory-mode local stack. Realm config not bundled (OLF License
|
|
54
|
+
§4 review pending); fetch instructions in CONTRIBUTING.md.
|
|
55
|
+
Headless CI integration (release.yml NE:ONE gate, nightly job)
|
|
56
|
+
deferred to v0.3 — bundling realm + per-run reset is multi-day work.
|
|
57
|
+
- **`MAINTENANCE.md`** — release playbook + signing key info + npm
|
|
58
|
+
credential policy + bus-factor note (R8 mitigation).
|
|
59
|
+
- **Six newly-identified spec deviations (#6–#11)** documented:
|
|
60
|
+
- **#6 — domain-semantic cross-node validation**: PARTIAL closure
|
|
61
|
+
(root-level cardinality enforced via `domain_constraint_violation`;
|
|
62
|
+
Waybill.shipmentInformation REQUIRED, Shipment.containedPieces
|
|
63
|
+
REQUIRED ≥1). AWB consistency, total-pieces sums, and reference
|
|
64
|
+
resolvability still v0.3 work.
|
|
65
|
+
- **#7 — IRI dereferenceability**: CLOSED via opt-in helper
|
|
66
|
+
`dereferenceIri(iri, opts)` async utility. Library doesn't wire
|
|
67
|
+
into deserializers (would force network I/O); consumers call
|
|
68
|
+
when they need it.
|
|
69
|
+
- **#8 — blank-node rejection**: CLOSED. Pre-Zod check at
|
|
70
|
+
`src/safety/blank-node.ts` emits `blank_node_forbidden` for
|
|
71
|
+
`_:b0`-style `@id` values per spec §3.2.
|
|
72
|
+
- **#9 — IRI canonicalization**: CLOSED via opt-in dispatch
|
|
73
|
+
(`iri_not_canonical` for uppercase scheme/host or default port
|
|
74
|
+
per RFC 3987 + spec §3.2).
|
|
75
|
+
- **#10 — `@context` array-order**: CLOSED via opt-in dispatch
|
|
76
|
+
(`context_order_violation` when array @context's last element
|
|
77
|
+
is not in the allowlist; per JSON-LD 1.1 §3.7 last item is the
|
|
78
|
+
effective context).
|
|
79
|
+
- **Spec deviation #11** — STATE_DIAGRAM source-state keys do not
|
|
80
|
+
match `BookingOption.optionStatus` enum; documents intentional
|
|
81
|
+
hardcode in the four `*BookingOption` transitions. Resolution
|
|
82
|
+
requires IATA §5.4 reconciliation; v0.3.
|
|
83
|
+
|
|
84
|
+
### Changed
|
|
85
|
+
|
|
86
|
+
- **FSU code fixture regenerated** with a real `sha256:` blob hash
|
|
87
|
+
(`f5f483a5...`) sourced from upstream IATA-Cargo via the new sibling
|
|
88
|
+
[`tjo099/onerecord-xlsx-tools`](https://github.com/tjo099/onerecord-xlsx-tools)
|
|
89
|
+
tool. v0.1.x's hand-pinned 26 codes diverged from the upstream working
|
|
90
|
+
draft by 6 codes in each direction. Per Phase 0 verification the
|
|
91
|
+
upstream set is adopted: removes CLR, FOO, FWB, OFD, RCM, RCV; adds
|
|
92
|
+
DOC, DPU, FIW, FOW, OCI, OSI. `FSU_EVENT_CODES` const updated to
|
|
93
|
+
match. Closes deviation #4.
|
|
94
|
+
- Spec rev-2 wording corrected: the reference NE:ONE Server is hosted
|
|
95
|
+
by the **Open Logistics Foundation Working Group on Digital Air
|
|
96
|
+
Cargo**, not IATA-Cargo. OLF License v1.3 — unrestricted CI use
|
|
97
|
+
confirmed (R6 closure).
|
|
98
|
+
|
|
99
|
+
### Deprecated
|
|
100
|
+
|
|
101
|
+
- **`acceptBookingOption`** — marked `@deprecated`; removal in v0.3
|
|
102
|
+
unless IATA §5.4 reconciliation restores the §5.2 shortcut. Migrate
|
|
103
|
+
to `acceptBookingOptionViaRequest`.
|
|
104
|
+
|
|
105
|
+
### Removed
|
|
106
|
+
|
|
107
|
+
- **`xlsx` devDep** moved to the sibling
|
|
108
|
+
[`tjo099/onerecord-xlsx-tools`](https://github.com/tjo099/onerecord-xlsx-tools)
|
|
109
|
+
repo. Closes the two high-severity advisories on the main library's
|
|
110
|
+
surface (Prototype Pollution + ReDoS). `bun audit` now shows 2
|
|
111
|
+
remaining vitest-transitive moderates only.
|
|
112
|
+
- `scripts/convert-iata-xlsx.ts` — moved to the sibling repo.
|
|
113
|
+
|
|
114
|
+
### Fixed
|
|
115
|
+
|
|
116
|
+
- v0.1.2 GitHub Release page backfilled (the auto-create step in
|
|
117
|
+
`release.yml` failed on the v0.1.2 publish before commit `d8acc2c`
|
|
118
|
+
added the explicit `git fetch --tags --force` step).
|
|
119
|
+
- Re-enabled four `it.skip` placeholder tests in `test/deserialize-errors/`:
|
|
120
|
+
`forbidden_state_transition`, `operation_field_not_allowed`,
|
|
121
|
+
`prototype_pollution_attempt` + `invalid_pointer` (via `applyChange`),
|
|
122
|
+
and `change_partial_failure`. Plus the four graph-walk-emitted kinds
|
|
123
|
+
(`duplicate_id_in_graph`, `missing_id`, `missing_type`,
|
|
124
|
+
`wrong_type_for_endpoint`) — formerly placeholders, now real
|
|
125
|
+
assertions against `dispatchGraphWalk`.
|
|
126
|
+
|
|
127
|
+
### Plan deviations (v0.2.0 work that diverged from the original plan)
|
|
128
|
+
|
|
129
|
+
- **Phase 2 Task 2.1 reinterpreted (Path B)** — the plan proposed
|
|
130
|
+
reading `canTransition` source state from `opt.optionStatus`. The
|
|
131
|
+
Phase 2 readiness scan showed this would break every BookingOption
|
|
132
|
+
transition because STATE_DIAGRAM source-state keys don't align with
|
|
133
|
+
the schema's optionStatus enum. The hardcode is intentional pending
|
|
134
|
+
v0.3 reconciliation; deviation #11 documents the underlying issue.
|
|
135
|
+
- **Phase 5 fully scoped** — all 6 contract test topics implemented
|
|
136
|
+
in v0.2.0 (Waybill, Shipment, Piece, booking-flow, operations,
|
|
137
|
+
notification). CI integration (release.yml NE:ONE gate, nightly
|
|
138
|
+
contract job) still deferred to v0.3 — bundling realm config +
|
|
139
|
+
per-run stack reset for headless runners is multi-day work; the
|
|
140
|
+
skeleton compose file is the v0.3 starting point. Run manually
|
|
141
|
+
before tagging via `bun run test:contract`.
|
|
142
|
+
- **Phase 1 Task 1.5 location** — sibling repo cloned to
|
|
143
|
+
`F:/dev/onerecord-xlsx-tools/` (matching the maintainer's
|
|
144
|
+
`F:/dev/` convention) instead of the plan's `/tmp/`.
|
|
145
|
+
- **Plan-vs-API drifts surfaced and corrected** — the plan's verbatim
|
|
146
|
+
test code for Tasks 1.2/1.3/1.4 used an obsolete Operations API
|
|
147
|
+
(`o`/`s`/`v` shorthand vs. real `op`/`path`/`value`;
|
|
148
|
+
`Change.operations` vs. real `Change.hasOperation`; `add`/`replace`
|
|
149
|
+
enum vs. real `ADD`/`DELETE`). Test bodies rewritten to match real
|
|
150
|
+
schemas. Plan's `findContainingClass` always-returns-undefined logic
|
|
151
|
+
bug fixed in `dispatchGraphWalk` (depth-1 wrong-type checks now fire).
|
|
152
|
+
- **Test paths normalized** — `test/api-surface/` and `test/dispatch/`
|
|
153
|
+
in the plan's File Structure table actually live at
|
|
154
|
+
`test/unit/api-surface/` and replaced existing placeholders in
|
|
155
|
+
`test/deserialize-errors/`.
|
|
156
|
+
|
|
157
|
+
## [0.1.2] - 2026-04-27 (npm publish — supersedes 0.1.1)
|
|
158
|
+
|
|
159
|
+
`@flaks/onerecord` is now published to the public npm registry as a
|
|
160
|
+
scoped public package. **This is the first version Tracks B + C
|
|
161
|
+
should adopt.** v0.1.1's `prepare`-script approach to the git-URL
|
|
162
|
+
install issue does not work on Bun (default "trusted dependencies"
|
|
163
|
+
model blocks lifecycle scripts); v0.1.2 ships pre-built `dist/` in
|
|
164
|
+
the registry tarball, making `bun add @flaks/onerecord` work
|
|
165
|
+
zero-config across all package managers.
|
|
166
|
+
|
|
167
|
+
### Install
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npm install @flaks/onerecord
|
|
171
|
+
# or
|
|
172
|
+
bun add @flaks/onerecord
|
|
173
|
+
# or
|
|
174
|
+
pnpm add @flaks/onerecord
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Why npm publish moved earlier than the v0.2.0 plan
|
|
178
|
+
|
|
179
|
+
The original v0.2.0 roadmap listed npm publish as one of several
|
|
180
|
+
ecosystem-hardening items (alongside NE:ONE contract test, SBOM/SLSA,
|
|
181
|
+
bundle-size assertion). After v0.1.0 + v0.1.1 git-URL distribution
|
|
182
|
+
attempts proved unworkable for Bun consumers, npm publish moved into
|
|
183
|
+
v0.1.2 as a hotfix. The remaining v0.2.0 items still apply.
|
|
184
|
+
|
|
185
|
+
### Release pipeline fix
|
|
186
|
+
|
|
187
|
+
- Add `fetch-tags: true` to the `actions/checkout` step in
|
|
188
|
+
`release.yml`. Without this, the runner's git tag object is
|
|
189
|
+
materialized as a lightweight ref (commit only, no signature
|
|
190
|
+
metadata), and `git tag -v` fails with `cannot verify a non-tag
|
|
191
|
+
object of type commit`. This is what caused the v0.1.1 release.yml
|
|
192
|
+
run to fail.
|
|
193
|
+
|
|
194
|
+
### Package metadata
|
|
195
|
+
|
|
196
|
+
- Added `keywords`, `homepage`, `bugs`, `author` fields to
|
|
197
|
+
`package.json` for npm registry display and search indexing.
|
|
198
|
+
- Changed `publishConfig.access` from `restricted` to `public`.
|
|
199
|
+
|
|
200
|
+
### Note on v0.1.1
|
|
201
|
+
|
|
202
|
+
v0.1.1 remains tagged in git but is documented broken — `prepare`
|
|
203
|
+
script alone does not work for Bun consumers. Do not pin to v0.1.1.
|
|
204
|
+
v0.1.2 is the version Tracks B + C should adopt.
|
|
205
|
+
|
|
206
|
+
## [0.1.1] - 2026-04-27 (install fix attempt — superseded by 0.1.2)
|
|
207
|
+
|
|
208
|
+
**Tagged but functionally broken on Bun consumers.** This release
|
|
209
|
+
attempted to fix the v0.1.0 git-URL install breakage by adding a
|
|
210
|
+
`prepare` lifecycle script. The fix worked for npm consumers (which
|
|
211
|
+
default-trust `prepare` for git installs) but failed on Bun, which
|
|
212
|
+
default-blocks postinstall scripts via its "trusted dependencies"
|
|
213
|
+
model. See `[0.1.2]` above for the actual fix (npm publish).
|
|
214
|
+
|
|
215
|
+
The CHANGELOG content originally drafted under this version (open-
|
|
216
|
+
sourcing pass items: GPG signing, governance scaffolding, public docs,
|
|
217
|
+
public flip) shipped to `main` with this tag and is preserved on the
|
|
218
|
+
v0.1.1 commit (`86dd181`). All of those items are also present in
|
|
219
|
+
v0.1.2.
|
|
220
|
+
|
|
221
|
+
Original v0.1.1 changelog content follows for historical reference:
|
|
12
222
|
|
|
13
223
|
### Critical install fix
|
|
14
224
|
|
package/MIGRATING.md
CHANGED
|
@@ -2,19 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
This file documents one entry per minor release.
|
|
4
4
|
|
|
5
|
+
## Migrating from v0.1.x to v0.2.0
|
|
6
|
+
|
|
7
|
+
v0.2.0 is **non-breaking at the call-site level** for v0.1.x consumers.
|
|
8
|
+
Existing imports, codecs, and `createMapper({ ... })` calls work
|
|
9
|
+
unchanged. The release adds opt-in surfaces and one deprecation.
|
|
10
|
+
|
|
11
|
+
### What's new (additive — adopt if useful)
|
|
12
|
+
|
|
13
|
+
- **Graph-walk dispatcher** for cross-node integrity validation:
|
|
14
|
+
```typescript
|
|
15
|
+
// Option A — namespaced facade
|
|
16
|
+
import { onerecord } from '@flaks/onerecord'
|
|
17
|
+
const r = onerecord.dispatch.deserialize.Waybill(input)
|
|
18
|
+
|
|
19
|
+
// Option B — bound mapper
|
|
20
|
+
import { createMapper } from '@flaks/onerecord'
|
|
21
|
+
const m = createMapper({ graphWalk: true })
|
|
22
|
+
const r = m.deserializeWaybill(input)
|
|
23
|
+
```
|
|
24
|
+
Both emit `duplicate_id_in_graph`, `missing_id`, `wrong_type_for_endpoint`,
|
|
25
|
+
`missing_type` for cross-node violations on direct children of the
|
|
26
|
+
root. Default per-class deserializers (`WaybillCodec.deserialize`,
|
|
27
|
+
`onerecord.deserialize.Waybill`) are unchanged — graph-walk is opt-in.
|
|
28
|
+
|
|
29
|
+
- **`acceptBookingOptionViaRequest`** — spec §5.4-correct booking flow
|
|
30
|
+
that returns the `BookingOptionRequest` intermediate state instead
|
|
31
|
+
of jumping straight to `Booking`:
|
|
32
|
+
```typescript
|
|
33
|
+
import { acceptBookingOptionViaRequest } from '@flaks/onerecord'
|
|
34
|
+
const result = acceptBookingOptionViaRequest(opt)
|
|
35
|
+
// result.value is BookingOptionRequest, not Booking
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Deprecations (warn now, remove in v0.3)
|
|
39
|
+
|
|
40
|
+
- **`acceptBookingOption`** is `@deprecated`. Migrate to
|
|
41
|
+
`acceptBookingOptionViaRequest` and chain through your persistence
|
|
42
|
+
layer's BookingOptionRequest → Booking transition. Removal in v0.3
|
|
43
|
+
unless an IATA §5.4 spec amendment restores the §5.2 shortcut.
|
|
44
|
+
TypeScript will surface the deprecation; runtime behavior is unchanged
|
|
45
|
+
through v0.2.x.
|
|
46
|
+
|
|
47
|
+
### FSU code list — 6 codes changed in each direction
|
|
48
|
+
|
|
49
|
+
The `FSU_EVENT_CODES` const + `test/fixtures/iata/xfsu-status-codes.json`
|
|
50
|
+
were regenerated from the upstream IATA-Cargo working draft. Net count
|
|
51
|
+
unchanged at 26, but **6 codes were dropped and 6 were added**:
|
|
52
|
+
|
|
53
|
+
- Removed: CLR, FOO, FWB, OFD, RCM, RCV
|
|
54
|
+
- Added: DOC, DPU, FIW, FOW, OCI, OSI
|
|
55
|
+
|
|
56
|
+
If your application enumerates FSU codes directly via `FsuCode` or
|
|
57
|
+
`FSU_EVENT_CODES.<KEY>`, switch to the new keys. Audit before updating;
|
|
58
|
+
this is the only behavior change that may break consumer code.
|
|
59
|
+
|
|
60
|
+
### Bun-style consumers using `ignoreScripts`
|
|
61
|
+
|
|
62
|
+
If your consumer project sets `bun install --ignoreScripts` or equivalent,
|
|
63
|
+
v0.2.0 is unaffected — the library has no `prepare`/`postinstall` scripts.
|
|
64
|
+
The `xlsx` devDep (which carried two high-severity advisories) was
|
|
65
|
+
extracted to the sibling [`tjo099/onerecord-xlsx-tools`](https://github.com/tjo099/onerecord-xlsx-tools)
|
|
66
|
+
repo in v0.2.0. Your `bun audit` against `@flaks/onerecord` should now
|
|
67
|
+
show 0 findings from `xlsx` — only 2 vitest-transitive moderates remain.
|
|
68
|
+
|
|
5
69
|
## Migrating to v0.1.0
|
|
6
70
|
|
|
7
71
|
v0.1.0 is the first minor release. There is no prior version to migrate from.
|
|
8
72
|
|
|
9
|
-
### Install
|
|
73
|
+
### Install (current — v0.1.2 onwards)
|
|
10
74
|
|
|
11
75
|
```bash
|
|
12
|
-
|
|
76
|
+
npm install @flaks/onerecord
|
|
77
|
+
# or
|
|
78
|
+
bun add @flaks/onerecord
|
|
13
79
|
```
|
|
14
80
|
|
|
15
|
-
Pin
|
|
16
|
-
|
|
17
|
-
|
|
81
|
+
Pin a minor range in production (e.g. `"@flaks/onerecord": "^0.1.0"`).
|
|
82
|
+
|
|
83
|
+
### Older install paths (historical)
|
|
84
|
+
|
|
85
|
+
- `v0.1.0` shipped as a git-URL install only. Do not use — `dist/` was
|
|
86
|
+
not in the tag. See CHANGELOG for details.
|
|
87
|
+
- `v0.1.1` attempted a `prepare`-script fix for git-URL installs.
|
|
88
|
+
Does not work on Bun's default "trusted dependencies" model. Skipped
|
|
89
|
+
in favor of v0.1.2 npm publish.
|
|
18
90
|
|
|
19
91
|
### Recommended import patterns
|
|
20
92
|
|
package/README.md
CHANGED
|
@@ -30,6 +30,12 @@ Use this library if you're building cargo software that needs to:
|
|
|
30
30
|
- **Refuse** malformed graphs early — depth bombs, prototype-pollution
|
|
31
31
|
attempts, empty arrays on the wire, circular references — before they
|
|
32
32
|
reach Zod or your downstream code.
|
|
33
|
+
- **Catch cross-node graph violations** with `createMapper({ graphWalk: true })`
|
|
34
|
+
or the `onerecord.dispatch.deserialize.<Class>` namespace —
|
|
35
|
+
`duplicate_id_in_graph`, `missing_id`, `wrong_type_for_endpoint`,
|
|
36
|
+
`missing_type`, all surfaced as typed `ParseError` variants. Default
|
|
37
|
+
per-class deserializers stay structural-only for v0.1.x compatibility;
|
|
38
|
+
graph-walk is opt-in.
|
|
33
39
|
- **Type-check** every parse-failure path: `ParseError` is a 22-variant
|
|
34
40
|
discriminated union, so the compiler tells you when you've forgotten a
|
|
35
41
|
failure mode.
|
|
@@ -37,13 +43,49 @@ Use this library if you're building cargo software that needs to:
|
|
|
37
43
|
Skip it if you want a generic JSON-LD or RDF toolkit; this is purpose-built
|
|
38
44
|
for the IATA cargo ontology and the ONE Record API spec 2.2.0.
|
|
39
45
|
|
|
46
|
+
### Publicly verifiable
|
|
47
|
+
|
|
48
|
+
This library publishes verifiable artifacts so consumers can audit the
|
|
49
|
+
conformance claim independently:
|
|
50
|
+
|
|
51
|
+
- All releases are GPG-signed git tags + signed npm tarballs (per
|
|
52
|
+
[`MAINTENANCE.md`](MAINTENANCE.md)).
|
|
53
|
+
- Every spec deviation is documented in [`docs/spec-deviations.md`](docs/spec-deviations.md)
|
|
54
|
+
with status banners (CLOSED, PARTIAL, deferred-to-v0.3) and explicit
|
|
55
|
+
guidance on what consumers should do today.
|
|
56
|
+
- Property-based round-trip tests for the eight Ring 1+2 classes
|
|
57
|
+
(Waybill, Shipment, Piece, Address, Person, Organization, Party,
|
|
58
|
+
AccountNumber) — `serialize(deserialize(x))` is field-equivalent for
|
|
59
|
+
any value an `Arbitrary` produces.
|
|
60
|
+
- Contract tests at `test/contract/` exercise the wire format
|
|
61
|
+
end-to-end against the OLF-hosted reference NE:ONE Server (the IATA
|
|
62
|
+
OneRecord reference implementation). See [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
63
|
+
for how to run them.
|
|
64
|
+
|
|
40
65
|
## Status
|
|
41
66
|
|
|
42
|
-
`v0.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
`v0.2.0` ships:
|
|
68
|
+
|
|
69
|
+
- The 32 canonical cargo data model classes (Ring 1–5 plus booking-flow)
|
|
70
|
+
with full round-trip codecs, Zod schemas, snapshot tests, and pre-Zod
|
|
71
|
+
safety primitives.
|
|
72
|
+
- Opt-in **graph-walk dispatcher** (`createMapper({ graphWalk: true })` or
|
|
73
|
+
`onerecord.dispatch.deserialize.<Class>`) emitting all four cross-node
|
|
74
|
+
integrity ParseError kinds.
|
|
75
|
+
- Spec-correct **`acceptBookingOptionViaRequest`** transition that returns
|
|
76
|
+
the `BookingOptionRequest` intermediate per spec §5.4. The legacy
|
|
77
|
+
`acceptBookingOption` is `@deprecated` (removal v0.3 unless IATA §5.4
|
|
78
|
+
reconciliation restores the §5.2 shortcut).
|
|
79
|
+
- Property-based round-trip tests for **all 8 Ring 1+2 classes**.
|
|
80
|
+
- FSU code fixture regenerated with a real `sha256:` blob hash, sourced
|
|
81
|
+
from upstream IATA-Cargo via the sibling
|
|
82
|
+
[`tjo099/onerecord-xlsx-tools`](https://github.com/tjo099/onerecord-xlsx-tools)
|
|
83
|
+
tool. Library no longer carries the `xlsx` devDep — closes the two
|
|
84
|
+
high-severity Prototype Pollution + ReDoS advisories.
|
|
85
|
+
- See [`docs/roadmap.md`](docs/roadmap.md) for what's next.
|
|
86
|
+
|
|
87
|
+
The library is Apache-2.0 and ready for use within the v0.x stability
|
|
88
|
+
policy described in [`MIGRATING.md`](MIGRATING.md).
|
|
47
89
|
|
|
48
90
|
Spec compliance: cargo data model **3.2 (2025-07 endorsed standard)**, API
|
|
49
91
|
spec **2.2.0**. A small number of deliberate divergences from canonical
|
|
@@ -54,13 +96,23 @@ adopting if your integration must match the spec verbatim.
|
|
|
54
96
|
## Install
|
|
55
97
|
|
|
56
98
|
```bash
|
|
57
|
-
|
|
99
|
+
npm install @flaks/onerecord
|
|
100
|
+
# or
|
|
101
|
+
bun add @flaks/onerecord
|
|
102
|
+
# or
|
|
103
|
+
pnpm add @flaks/onerecord
|
|
58
104
|
```
|
|
59
105
|
|
|
60
|
-
Pin
|
|
61
|
-
versions may introduce breaking changes
|
|
62
|
-
patch versions will not.
|
|
63
|
-
|
|
106
|
+
Pin a minor range in production (e.g. `"@flaks/onerecord": "^0.2.0"`).
|
|
107
|
+
Per `MIGRATING.md`, minor versions may introduce breaking changes
|
|
108
|
+
documented in `CHANGELOG.md`; patch versions will not.
|
|
109
|
+
|
|
110
|
+
Installing from a git tag is also supported for testing forks or
|
|
111
|
+
unreleased branches:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
bun add git+https://github.com/tjo099/onerecord-mapper#v0.2.0
|
|
115
|
+
```
|
|
64
116
|
|
|
65
117
|
## Usage
|
|
66
118
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { canTransition } from './can-transition.js';
|
|
2
2
|
export { STATE_DIAGRAM } from './state-diagram.js';
|
|
3
3
|
export type { BookingAction, BookingType, StateDiagram, Transition, } from './state-diagram.js';
|
|
4
|
-
export { acceptBookingOption, acceptBookingRequest, rejectBookingOption, revokeBookingOption, } from './transitions.js';
|
|
4
|
+
export { acceptBookingOption, acceptBookingOptionViaRequest, acceptBookingRequest, rejectBookingOption, revokeBookingOption, } from './transitions.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/booking-flow/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/booking-flow/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/booking-flow/index.ts
|
|
2
2
|
export { canTransition } from './can-transition.js';
|
|
3
3
|
export { STATE_DIAGRAM } from './state-diagram.js';
|
|
4
|
-
export { acceptBookingOption, acceptBookingRequest, rejectBookingOption, revokeBookingOption, } from './transitions.js';
|
|
4
|
+
export { acceptBookingOption, acceptBookingOptionViaRequest, acceptBookingRequest, rejectBookingOption, revokeBookingOption, } from './transitions.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/booking-flow/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAOlD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/booking-flow/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAOlD,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,9 +1,30 @@
|
|
|
1
|
+
import type { BookingOptionRequest } from '../classes/booking-option-request/schema.js';
|
|
1
2
|
import type { BookingOption } from '../classes/booking-option/schema.js';
|
|
2
3
|
import type { BookingRequest } from '../classes/booking-request/schema.js';
|
|
3
4
|
import type { Booking } from '../classes/booking/schema.js';
|
|
4
5
|
import type { ParseResult } from '../result.js';
|
|
5
6
|
export declare function acceptBookingRequest(req: BookingRequest): ParseResult<BookingOption>;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated v0.2 deprecation; removal in v0.3.
|
|
9
|
+
*
|
|
10
|
+
* Skips the `BookingOptionRequest` intermediate state per spec §5.4
|
|
11
|
+
* STATE_DIAGRAM. Use `acceptBookingOptionViaRequest(opt)` instead and
|
|
12
|
+
* chain to your persistence layer's BookingOptionRequest -> Booking
|
|
13
|
+
* transition. If the IATA §5.4 reconciliation accepts the §5.2
|
|
14
|
+
* shortcut, this annotation will be relaxed.
|
|
15
|
+
*/
|
|
6
16
|
export declare function acceptBookingOption(opt: BookingOption): ParseResult<Booking>;
|
|
7
17
|
export declare function rejectBookingOption(opt: BookingOption, _reason?: string): ParseResult<BookingOption>;
|
|
8
18
|
export declare function revokeBookingOption(opt: BookingOption, _reason?: string): ParseResult<BookingOption>;
|
|
19
|
+
/**
|
|
20
|
+
* Accept a BookingOption per spec §5.4 STATE_DIAGRAM. Returns the
|
|
21
|
+
* intermediate `BookingOptionRequest` resource (not directly a Booking).
|
|
22
|
+
*
|
|
23
|
+
* The carrier-side decision step (BookingOptionRequest.REQUEST_PENDING ->
|
|
24
|
+
* REQUEST_ACCEPTED -> Booking) is modelled separately in v0.3.0. v0.2.0
|
|
25
|
+
* only models the forwarder->carrier request transition.
|
|
26
|
+
*
|
|
27
|
+
* Source-state hardcode: see top-of-file comment + deviation #11.
|
|
28
|
+
*/
|
|
29
|
+
export declare function acceptBookingOptionViaRequest(opt: BookingOption): ParseResult<BookingOptionRequest>;
|
|
9
30
|
//# sourceMappingURL=transitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/booking-flow/transitions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/booking-flow/transitions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AA+B/C,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW,CAAC,aAAa,CAAC,CAoBpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,CAqB5E;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,WAAW,CAAC,aAAa,CAAC,CAmB5B;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,WAAW,CAAC,aAAa,CAAC,CAa5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,aAAa,GACjB,WAAW,CAAC,oBAAoB,CAAC,CAoBnC"}
|
|
@@ -3,11 +3,23 @@ import { randomUUID } from 'node:crypto';
|
|
|
3
3
|
import { CARGO_CONTEXT_IRI } from '../version.js';
|
|
4
4
|
import { canTransition } from './can-transition.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* v0.2 booking-flow status:
|
|
7
|
+
* - `acceptBookingOptionViaRequest` (below) returns the spec-§5.4
|
|
8
|
+
* intermediate `BookingOptionRequest` — the spec-correct path.
|
|
9
|
+
* - `acceptBookingOption` (legacy, @deprecated) continues to return
|
|
10
|
+
* `Booking` directly per spec §5.2 signature; removal v0.3 unless
|
|
11
|
+
* IATA §5.4 reconciliation restores the §5.2 shortcut.
|
|
12
|
+
*
|
|
13
|
+
* Source-state hardcode: all four BookingOption transition functions
|
|
14
|
+
* (acceptBookingOption, rejectBookingOption, revokeBookingOption,
|
|
15
|
+
* acceptBookingOptionViaRequest) pass the constant `'REQUEST_PENDING'`
|
|
16
|
+
* as the source state to `canTransition` rather than reading
|
|
17
|
+
* `opt.optionStatus`. This is intentional — see deviation #11 in
|
|
18
|
+
* `docs/spec-deviations.md`. The schema's optionStatus enum
|
|
19
|
+
* (OPTION_PROPOSED/_ACCEPTED/_REJECTED) does not align with
|
|
20
|
+
* STATE_DIAGRAM.BookingOption's source-state keys (REQUEST_PENDING).
|
|
21
|
+
* Reading `opt.optionStatus` would make every transition fail.
|
|
22
|
+
* Reconciliation deferred to v0.3.
|
|
11
23
|
*/
|
|
12
24
|
const TENANT = 'transitions';
|
|
13
25
|
const HOST = 'flaks.example';
|
|
@@ -35,6 +47,15 @@ export function acceptBookingRequest(req) {
|
|
|
35
47
|
};
|
|
36
48
|
return { ok: true, value: opt };
|
|
37
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated v0.2 deprecation; removal in v0.3.
|
|
52
|
+
*
|
|
53
|
+
* Skips the `BookingOptionRequest` intermediate state per spec §5.4
|
|
54
|
+
* STATE_DIAGRAM. Use `acceptBookingOptionViaRequest(opt)` instead and
|
|
55
|
+
* chain to your persistence layer's BookingOptionRequest -> Booking
|
|
56
|
+
* transition. If the IATA §5.4 reconciliation accepts the §5.2
|
|
57
|
+
* shortcut, this annotation will be relaxed.
|
|
58
|
+
*/
|
|
38
59
|
export function acceptBookingOption(opt) {
|
|
39
60
|
const t = canTransition('BookingOption', 'REQUEST_PENDING', 'accept');
|
|
40
61
|
if (!t)
|
|
@@ -91,4 +112,35 @@ export function revokeBookingOption(opt, _reason) {
|
|
|
91
112
|
};
|
|
92
113
|
return { ok: true, value: { ...opt, optionStatus: 'OPTION_REJECTED' } };
|
|
93
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Accept a BookingOption per spec §5.4 STATE_DIAGRAM. Returns the
|
|
117
|
+
* intermediate `BookingOptionRequest` resource (not directly a Booking).
|
|
118
|
+
*
|
|
119
|
+
* The carrier-side decision step (BookingOptionRequest.REQUEST_PENDING ->
|
|
120
|
+
* REQUEST_ACCEPTED -> Booking) is modelled separately in v0.3.0. v0.2.0
|
|
121
|
+
* only models the forwarder->carrier request transition.
|
|
122
|
+
*
|
|
123
|
+
* Source-state hardcode: see top-of-file comment + deviation #11.
|
|
124
|
+
*/
|
|
125
|
+
export function acceptBookingOptionViaRequest(opt) {
|
|
126
|
+
const t = canTransition('BookingOption', 'REQUEST_PENDING', 'accept');
|
|
127
|
+
if (!t)
|
|
128
|
+
return {
|
|
129
|
+
ok: false,
|
|
130
|
+
error: {
|
|
131
|
+
kind: 'forbidden_state_transition',
|
|
132
|
+
from: 'BookingOption.REQUEST_PENDING',
|
|
133
|
+
to: 'accept',
|
|
134
|
+
path: '$',
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
const req = {
|
|
138
|
+
'@context': CARGO_CONTEXT_IRI,
|
|
139
|
+
'@type': 'BookingOptionRequest',
|
|
140
|
+
'@id': makeId('BookingOptionRequest'),
|
|
141
|
+
forBookingOption: opt['@id'],
|
|
142
|
+
requestStatus: 'REQUEST_PENDING',
|
|
143
|
+
};
|
|
144
|
+
return { ok: true, value: req };
|
|
145
|
+
}
|
|
94
146
|
//# sourceMappingURL=transitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/booking-flow/transitions.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/booking-flow/transitions.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,24 +4,24 @@ export declare const FSU_EVENT_CODES: Readonly<{
|
|
|
4
4
|
readonly AWR: "AWR";
|
|
5
5
|
readonly BKD: "BKD";
|
|
6
6
|
readonly CCD: "CCD";
|
|
7
|
-
readonly CLR: "CLR";
|
|
8
7
|
readonly CRC: "CRC";
|
|
9
8
|
readonly DDL: "DDL";
|
|
10
9
|
readonly DEP: "DEP";
|
|
11
10
|
readonly DIS: "DIS";
|
|
12
11
|
readonly DLV: "DLV";
|
|
12
|
+
readonly DOC: "DOC";
|
|
13
|
+
readonly DPU: "DPU";
|
|
14
|
+
readonly FIW: "FIW";
|
|
13
15
|
readonly FOH: "FOH";
|
|
14
|
-
readonly
|
|
15
|
-
readonly FWB: "FWB";
|
|
16
|
+
readonly FOW: "FOW";
|
|
16
17
|
readonly MAN: "MAN";
|
|
17
18
|
readonly NFD: "NFD";
|
|
18
|
-
readonly
|
|
19
|
+
readonly OCI: "OCI";
|
|
20
|
+
readonly OSI: "OSI";
|
|
19
21
|
readonly PRE: "PRE";
|
|
20
22
|
readonly RCF: "RCF";
|
|
21
|
-
readonly RCM: "RCM";
|
|
22
23
|
readonly RCS: "RCS";
|
|
23
24
|
readonly RCT: "RCT";
|
|
24
|
-
readonly RCV: "RCV";
|
|
25
25
|
readonly TFD: "TFD";
|
|
26
26
|
readonly TGC: "TGC";
|
|
27
27
|
readonly TRM: "TRM";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsu-event-codes.d.ts","sourceRoot":"","sources":["../../src/codes/fsu-event-codes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fsu-event-codes.d.ts","sourceRoot":"","sources":["../../src/codes/fsu-event-codes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BjB,CAAA;AAEX,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,eAAe,CAAA;AAElD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE/D"}
|