@flaks/onerecord 0.4.0 → 0.6.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 +98 -0
- package/MIGRATING.md +108 -0
- package/README.md +7 -0
- package/dist/api/index.d.ts +296 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +197 -0
- package/dist/api/index.js.map +1 -0
- package/dist/booking-flow/can-transition.d.ts +3 -0
- package/dist/booking-flow/can-transition.d.ts.map +1 -1
- package/dist/booking-flow/can-transition.js +3 -0
- package/dist/booking-flow/can-transition.js.map +1 -1
- package/dist/booking-flow/state-diagram.d.ts +5 -1
- package/dist/booking-flow/state-diagram.d.ts.map +1 -1
- package/dist/booking-flow/state-diagram.js +5 -1
- package/dist/booking-flow/state-diagram.js.map +1 -1
- package/dist/booking-flow/transitions.d.ts +14 -1
- package/dist/booking-flow/transitions.d.ts.map +1 -1
- package/dist/booking-flow/transitions.js +73 -18
- package/dist/booking-flow/transitions.js.map +1 -1
- package/dist/classes/booking/schema.d.ts +94 -4
- package/dist/classes/booking/schema.d.ts.map +1 -1
- package/dist/classes/booking/schema.js +43 -2
- package/dist/classes/booking/schema.js.map +1 -1
- package/dist/classes/booking-option/schema.d.ts +58 -4
- package/dist/classes/booking-option/schema.d.ts.map +1 -1
- package/dist/classes/booking-option/schema.js +24 -2
- package/dist/classes/booking-option/schema.js.map +1 -1
- package/dist/classes/booking-request/schema.d.ts +17 -4
- package/dist/classes/booking-request/schema.d.ts.map +1 -1
- package/dist/classes/booking-request/schema.js +20 -7
- package/dist/classes/booking-request/schema.js.map +1 -1
- package/dist/classes/party/schema.d.ts +1 -1
- package/dist/classes/price/codec.d.ts +4 -0
- package/dist/classes/price/codec.d.ts.map +1 -0
- package/dist/classes/price/codec.js +11 -0
- package/dist/classes/price/codec.js.map +1 -0
- package/dist/classes/price/deserialize.d.ts +5 -0
- package/dist/classes/price/deserialize.d.ts.map +1 -0
- package/dist/classes/{organization → price}/deserialize.js +3 -3
- package/dist/classes/price/deserialize.js.map +1 -0
- package/dist/classes/price/index.d.ts +6 -0
- package/dist/classes/price/index.d.ts.map +1 -0
- package/dist/classes/price/index.js +5 -0
- package/dist/classes/price/index.js.map +1 -0
- package/dist/classes/price/schema.d.ts +14 -0
- package/dist/classes/price/schema.d.ts.map +1 -0
- package/dist/classes/price/schema.js +12 -0
- package/dist/classes/price/schema.js.map +1 -0
- package/dist/classes/price/serialize.d.ts +6 -0
- package/dist/classes/price/serialize.d.ts.map +1 -0
- package/dist/classes/{organization → price}/serialize.js +6 -6
- package/dist/classes/price/serialize.js.map +1 -0
- package/dist/classes/ratings/codec.d.ts +4 -0
- package/dist/classes/ratings/codec.d.ts.map +1 -0
- package/dist/classes/ratings/codec.js +11 -0
- package/dist/classes/ratings/codec.js.map +1 -0
- package/dist/classes/ratings/deserialize.d.ts +5 -0
- package/dist/classes/ratings/deserialize.d.ts.map +1 -0
- package/dist/classes/ratings/deserialize.js +64 -0
- package/dist/classes/ratings/deserialize.js.map +1 -0
- package/dist/classes/ratings/index.d.ts +6 -0
- package/dist/classes/ratings/index.d.ts.map +1 -0
- package/dist/classes/ratings/index.js +5 -0
- package/dist/classes/ratings/index.js.map +1 -0
- package/dist/classes/ratings/schema.d.ts +60 -0
- package/dist/classes/ratings/schema.d.ts.map +1 -0
- package/dist/classes/ratings/schema.js +23 -0
- package/dist/classes/ratings/schema.js.map +1 -0
- package/dist/classes/ratings/serialize.d.ts +6 -0
- package/dist/classes/ratings/serialize.d.ts.map +1 -0
- package/dist/classes/ratings/serialize.js +28 -0
- package/dist/classes/ratings/serialize.js.map +1 -0
- package/dist/classes/shared/distribution.d.ts +109 -0
- package/dist/classes/shared/distribution.d.ts.map +1 -0
- package/dist/classes/shared/distribution.js +97 -0
- package/dist/classes/shared/distribution.js.map +1 -0
- package/dist/classes/transport-legs/codec.d.ts +4 -0
- package/dist/classes/transport-legs/codec.d.ts.map +1 -0
- package/dist/classes/transport-legs/codec.js +11 -0
- package/dist/classes/transport-legs/codec.js.map +1 -0
- package/dist/classes/transport-legs/deserialize.d.ts +5 -0
- package/dist/classes/transport-legs/deserialize.d.ts.map +1 -0
- package/dist/classes/transport-legs/deserialize.js +64 -0
- package/dist/classes/transport-legs/deserialize.js.map +1 -0
- package/dist/classes/transport-legs/index.d.ts +6 -0
- package/dist/classes/transport-legs/index.d.ts.map +1 -0
- package/dist/classes/transport-legs/index.js +5 -0
- package/dist/classes/transport-legs/index.js.map +1 -0
- package/dist/classes/transport-legs/schema.d.ts +25 -0
- package/dist/classes/transport-legs/schema.d.ts.map +1 -0
- package/dist/classes/transport-legs/schema.js +19 -0
- package/dist/classes/transport-legs/schema.js.map +1 -0
- package/dist/classes/transport-legs/serialize.d.ts +6 -0
- package/dist/classes/transport-legs/serialize.d.ts.map +1 -0
- package/dist/classes/transport-legs/serialize.js +28 -0
- package/dist/classes/transport-legs/serialize.js.map +1 -0
- package/dist/classes/transport-movement/schema.d.ts +1 -1
- package/dist/codecs.d.ts +3 -0
- package/dist/codecs.d.ts.map +1 -1
- package/dist/codecs.js +3 -0
- package/dist/codecs.js.map +1 -1
- package/dist/codes/enums.d.ts +59 -8
- package/dist/codes/enums.d.ts.map +1 -1
- package/dist/codes/enums.js +45 -10
- package/dist/codes/enums.js.map +1 -1
- package/dist/codes/index.d.ts +1 -1
- package/dist/codes/index.d.ts.map +1 -1
- package/dist/codes/index.js +1 -1
- package/dist/codes/index.js.map +1 -1
- package/dist/dispatch/field-types.d.ts.map +1 -1
- package/dist/dispatch/field-types.js +30 -1
- package/dist/dispatch/field-types.js.map +1 -1
- package/dist/dispatch/iri-canonical.d.ts +5 -1
- package/dist/dispatch/iri-canonical.d.ts.map +1 -1
- package/dist/dispatch/iri-canonical.js +6 -2
- package/dist/dispatch/iri-canonical.js.map +1 -1
- package/dist/facade.d.ts +7 -4
- package/dist/facade.d.ts.map +1 -1
- package/dist/factory-classes.d.ts +6 -0
- package/dist/factory-classes.d.ts.map +1 -1
- package/dist/factory-classes.js +6 -0
- package/dist/factory-classes.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -5
- package/dist/classes/organization/codec.d.ts +0 -4
- package/dist/classes/organization/codec.d.ts.map +0 -1
- package/dist/classes/organization/codec.js +0 -11
- package/dist/classes/organization/codec.js.map +0 -1
- package/dist/classes/organization/deserialize.d.ts +0 -5
- package/dist/classes/organization/deserialize.d.ts.map +0 -1
- package/dist/classes/organization/deserialize.js.map +0 -1
- package/dist/classes/organization/index.d.ts +0 -6
- package/dist/classes/organization/index.d.ts.map +0 -1
- package/dist/classes/organization/index.js +0 -5
- package/dist/classes/organization/index.js.map +0 -1
- package/dist/classes/organization/schema.d.ts +0 -14
- package/dist/classes/organization/schema.d.ts.map +0 -1
- package/dist/classes/organization/schema.js +0 -11
- package/dist/classes/organization/schema.js.map +0 -1
- package/dist/classes/organization/serialize.d.ts +0 -6
- package/dist/classes/organization/serialize.d.ts.map +0 -1
- package/dist/classes/organization/serialize.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,104 @@ 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.6.0] - 2026-11-13
|
|
8
|
+
|
|
9
|
+
ONE Record 3.2.0 Quote & Book charge chain: `Price`, `Ratings` and
|
|
10
|
+
`TransportLegs`, and a full ontology realignment of `BookingOption`,
|
|
11
|
+
`BookingRequest` and `Booking`. Every payload 0.5.0 accepted still parses;
|
|
12
|
+
the 0.5.0 booking keys are kept and deprecated. The ontology pin stays 3.2.0.
|
|
13
|
+
Upgrade receivers first (see `MIGRATING.md`).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `Price`, `Ratings` and `TransportLegs` classes with codecs, schemas and
|
|
18
|
+
`serialize*` / `serialize*Strict` / `deserialize*` helpers; registered in
|
|
19
|
+
`CLASSES`, `CODECS`, the facade and `createMapper`.
|
|
20
|
+
- Code lists `ChargeIdentifier`, `PrepaidCollectIndicator`, `EntitlementCode`,
|
|
21
|
+
`SpaceAllocationCode` and `TransportMeansServiceType`.
|
|
22
|
+
- Nine embedded shapes, exported as types only: `Ranges`, `UnitsPreference`,
|
|
23
|
+
`CarrierProduct`, `StationRemarks`, `EmbeddedBookingTimes`, `PieceGroup`,
|
|
24
|
+
`EmbeddedBookingSegment`, `ActivitySequence`, `ContactDetail`.
|
|
25
|
+
- The complete 3.2.0 property sets on `BookingOption`, `BookingRequest` and
|
|
26
|
+
`Booking` (including the inherited `:LogisticsService` properties).
|
|
27
|
+
- 21 `FIELD_TYPES` entries for the new links.
|
|
28
|
+
- Vendored IATA ONE Record 3.2 / 3.3.0 ontology files (MIT), a typed
|
|
29
|
+
restriction extractor and a conformance guard that checks the chain
|
|
30
|
+
schemas against them. 3.3.0 was endorsed on 2026-07-25 and is the current
|
|
31
|
+
endorsed release; the package intentionally stays on the 3.2.0 pin, and
|
|
32
|
+
every in-scope Quote & Book class is identical in 3.3.0 (the guard proves
|
|
33
|
+
this).
|
|
34
|
+
- A `./codecs` runtime-surface snapshot, superset and mixed-fleet property
|
|
35
|
+
tests against a frozen 0.5.0 oracle, and a Quote & Book chain fixture.
|
|
36
|
+
- Deviations #18 to #22 in `docs/spec-deviations.md`, a Quote & Book wire
|
|
37
|
+
section in `docs/ONE_RECORD_2_2_PROFILE.md`, and conformance-matrix rows.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- `codes.BookingStatus` is now `CONFIRMED | DELETED | QUEUED | REJECTED` and
|
|
42
|
+
`codes.BookingOptionStatus` is now `BOOKABLE | BOOKED | EXPIRED |
|
|
43
|
+
NONBOOKABLE | NOT_BOOKABLE | ON_REQUEST | QUEUED` (the ontology values).
|
|
44
|
+
The old `REQUEST_*` values are no longer in these enums.
|
|
45
|
+
- `Booking.bookingStatus` is widened and optional: it accepts the four ontology values plus
|
|
46
|
+
`REQUEST_ACCEPTED` and `REQUEST_REVOKED` for 0.5.0 compatibility.
|
|
47
|
+
- `BookingOption.optionStatus`, `BookingRequest.requestStatus` and
|
|
48
|
+
`BookingRequest.requestor` were required and are now optional;
|
|
49
|
+
`BookingOption.forBookingRequest` is no longer required.
|
|
50
|
+
- `Booking.bookingStatus` and `Booking.forBookingRequest` were required in
|
|
51
|
+
0.5.0 and are now optional.
|
|
52
|
+
- The booking-flow helpers refuse ontology-shaped inputs explicitly
|
|
53
|
+
(`ontology_status_present`, `legacy_status_absent`); 0.5.0-valid inputs
|
|
54
|
+
behave as before.
|
|
55
|
+
- `__VERSION__` now reports `0.6.0`.
|
|
56
|
+
|
|
57
|
+
### Deprecated
|
|
58
|
+
|
|
59
|
+
- Legacy booking-chain keys: `BookingOption.optionStatus`, `expiresAt`,
|
|
60
|
+
`preferences`; `BookingRequest.requestStatus`, `requestor`, `preferences`;
|
|
61
|
+
`Booking.forBookingRequest`, `forBookingOption`. Removal is planned for
|
|
62
|
+
booking Path A, at the latest by 0.8.0 (deviation #18).
|
|
63
|
+
- The booking-flow helpers (the transition functions), `STATE_DIAGRAM` and
|
|
64
|
+
`canTransition` (deviation #21).
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- `FIELD_TYPES['Waybill.referredBookingOption']` pointed at `BookingOption`;
|
|
69
|
+
the ontology target is `Booking`.
|
|
70
|
+
- `looksLikeIri` now rejects strings that contain whitespace, so free text
|
|
71
|
+
such as `"NOTE: prepaid"` no longer triggers `iri_not_canonical` under the
|
|
72
|
+
graph walk (deviation #9).
|
|
73
|
+
|
|
74
|
+
## [0.5.0] - 2026-07-26
|
|
75
|
+
|
|
76
|
+
ONE Record API 2.2.0 interoperability boundary for applications that must
|
|
77
|
+
work both inside the Flaks sphere and with standards-only peers.
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
|
|
81
|
+
- Strict Zod wire schemas for ServerInformation, ChangeRequest,
|
|
82
|
+
SubscriptionRequest, AccessDelegationRequest, Notification, and their
|
|
83
|
+
embedded API objects.
|
|
84
|
+
- `assertEndorsedServerInformation`, which rejects peers that do not advertise
|
|
85
|
+
JSON-LD, API 2.2.0, the non-versioned cargo ontology IRI, and its separately
|
|
86
|
+
versioned 3.2.0 IRI.
|
|
87
|
+
- `OneRecordPeerProfileSchema` for transporting standards endpoint and OIDC
|
|
88
|
+
discovery metadata through Flaks Connect without coupling the ONE Record
|
|
89
|
+
protocol to Connect.
|
|
90
|
+
- The `@flaks/onerecord/api` export and equivalent root exports.
|
|
91
|
+
- A shared implementation profile in `docs/ONE_RECORD_2_2_PROFILE.md`.
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- `__VERSION__` now reports `0.5.0`.
|
|
96
|
+
- API-layer schemas accept compact `api:`/`cargo:` references as well as
|
|
97
|
+
absolute IRIs, matching the JSON-LD examples in the endorsed standard.
|
|
98
|
+
|
|
99
|
+
### Compatibility
|
|
100
|
+
|
|
101
|
+
- Existing cargo-model codecs and application-layer types are unchanged.
|
|
102
|
+
- No network publication is performed by this repository change. Consumers
|
|
103
|
+
must move to 0.5.0 only after the package release gate is completed.
|
|
104
|
+
|
|
7
105
|
## [0.4.0] - 2026-05-19
|
|
8
106
|
|
|
9
107
|
ULD composition classes: the `:UnitComposition` / `:Composing` /
|
package/MIGRATING.md
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
|
|
3
3
|
This file documents one entry per minor release.
|
|
4
4
|
|
|
5
|
+
## Migrating from v0.5.x to v0.6.0
|
|
6
|
+
|
|
7
|
+
0.6.0 aligns `BookingOption`, `BookingRequest` and `Booking` with the ONE
|
|
8
|
+
Record 3.2.0 Quote & Book chain and adds `Price`, `Ratings` and
|
|
9
|
+
`TransportLegs`. Every payload 0.5.0 accepted still parses (superset
|
|
10
|
+
acceptance), so a mixed fleet keeps working, and a legacy-shaped object
|
|
11
|
+
serialized by 0.6.0 is byte-identical to 0.5.0 output. **Upgrade receivers
|
|
12
|
+
first**: a 0.5.0 receiver rejects the new ontology keys (every schema is
|
|
13
|
+
strict), so a 0.6.0 producer must not send ontology-shaped objects to a
|
|
14
|
+
0.5.0 receiver.
|
|
15
|
+
|
|
16
|
+
### Breaking or behaviour-changing
|
|
17
|
+
|
|
18
|
+
- **Keys made optional.** `BookingOption.forBookingRequest` remains an
|
|
19
|
+
ontology key but is no longer required. The legacy keys
|
|
20
|
+
`BookingOption.optionStatus`, `BookingRequest.requestStatus` and
|
|
21
|
+
`BookingRequest.requestor` were required and are now optional. Likewise
|
|
22
|
+
`Booking.bookingStatus` and `Booking.forBookingRequest` were required in
|
|
23
|
+
0.5.0 and are now optional. Code that reads them must handle `undefined`
|
|
24
|
+
(deviation #18).
|
|
25
|
+
- **`Booking.bookingStatus` widened and optional.** It accepts the four `:BookingStatus`
|
|
26
|
+
values (`CONFIRMED`, `DELETED`, `QUEUED`, `REJECTED`) and, for 0.5.0
|
|
27
|
+
compatibility, `REQUEST_ACCEPTED` and `REQUEST_REVOKED`.
|
|
28
|
+
- **`codes.BookingStatus` and `codes.BookingOptionStatus` changed values.**
|
|
29
|
+
`BookingStatus` is now `CONFIRMED | DELETED | QUEUED | REJECTED`;
|
|
30
|
+
`BookingOptionStatus` is now `BOOKABLE | BOOKED | EXPIRED | NONBOOKABLE |
|
|
31
|
+
NOT_BOOKABLE | ON_REQUEST | QUEUED`. Comparisons against the old
|
|
32
|
+
`REQUEST_*` values now fail silently at runtime, and
|
|
33
|
+
`BookingStatus.parse(booking.bookingStatus)` throws on legacy values; use
|
|
34
|
+
`RequestStatus` for the legacy values instead.
|
|
35
|
+
- **`FIELD_TYPES['Waybill.referredBookingOption']`** now targets `Booking`,
|
|
36
|
+
not `BookingOption`, as the ontology defines it.
|
|
37
|
+
- **Booking-flow refusals and deprecation.** The five `booking-flow` helpers,
|
|
38
|
+
`STATE_DIAGRAM` and `canTransition` are `@deprecated`. They now refuse
|
|
39
|
+
ontology-shaped inputs: `statusBookingOption` present returns
|
|
40
|
+
`reason: 'ontology_status_present'`, and an absent `optionStatus` returns
|
|
41
|
+
`reason: 'legacy_status_absent'`. `acceptBookingRequest` likewise refuses an
|
|
42
|
+
input with no `requestStatus`, returning `forbidden_state_transition` with
|
|
43
|
+
`reason: 'legacy_status_absent'` and `from: 'BookingRequest.(absent)'`. Every 0.5.0-valid input behaves as before.
|
|
44
|
+
- **Role swap.** The legacy booking flow assigns the roles the other way
|
|
45
|
+
round to the ontology, and `BookingTimes`, `BookingSegment` and
|
|
46
|
+
`BookingPreferences` are LogisticsObject-shaped legacy classes where the
|
|
47
|
+
ontology has embedded classes (deviation #21). Both go to booking Path A
|
|
48
|
+
(target 0.7.0).
|
|
49
|
+
- **`looksLikeIri` rejects whitespace.** Free text such as `"NOTE: prepaid"`
|
|
50
|
+
no longer triggers `iri_not_canonical` under the graph walk (deviation #9). Under the graph walk, whitespace-free strings in non-IRI fields that contain a scheme-like prefix (e.g. `URGENT:Handle`, or a website `HTTPS://Example.com/x` in `ContactDetail.textualValue`) are still checked for canonical IRI form and can yield `iri_not_canonical` (deviation #9).
|
|
51
|
+
|
|
52
|
+
### Deprecations
|
|
53
|
+
|
|
54
|
+
The 0.5.0 keys that are not ONE Record properties of their class are
|
|
55
|
+
`@deprecated` and will be removed in booking Path A, at the latest by 0.8.0
|
|
56
|
+
(deviation #18). Emit ontology keys only (`statusBookingOption`,
|
|
57
|
+
`bookingRequest`, `offerValidTo`, ...). Deprecation is visible only through
|
|
58
|
+
the exported `BookingOption`, `BookingRequest` and `Booking` types. It is not
|
|
59
|
+
visible on values inferred from `XSchema.parse(...)`, because the
|
|
60
|
+
deprecation tags live on the hand-written types.
|
|
61
|
+
|
|
62
|
+
### Additions
|
|
63
|
+
|
|
64
|
+
- `Price`, `Ratings` and `TransportLegs` are registered in `CLASSES`,
|
|
65
|
+
`CODECS` (and so `./codecs`), the facade and `createMapper`.
|
|
66
|
+
- New code lists: `ChargeIdentifier`, `PrepaidCollectIndicator`,
|
|
67
|
+
`EntitlementCode`, `SpaceAllocationCode`, `TransportMeansServiceType`.
|
|
68
|
+
- Nine embedded shapes are exported as types only (`Ranges`,
|
|
69
|
+
`UnitsPreference`, `CarrierProduct`, `StationRemarks`,
|
|
70
|
+
`EmbeddedBookingTimes`, `PieceGroup`, `EmbeddedBookingSegment`,
|
|
71
|
+
`ActivitySequence`, `ContactDetail`).
|
|
72
|
+
|
|
73
|
+
### Profile rules that now matter
|
|
74
|
+
|
|
75
|
+
- **Multi-valued properties need a JSON array**, even for one value:
|
|
76
|
+
`Booking.additionalInformation: "x"` is rejected, `["x"]` is accepted, and
|
|
77
|
+
`[]` is rejected as `cardinality_violation`.
|
|
78
|
+
- **Reference IRIs are canonicalised, `@id` is not.** `safeIri` lowercases
|
|
79
|
+
scheme and host and adds `/` for an empty path, but a node's `@id` is kept
|
|
80
|
+
verbatim. Compare canonical forms when joining a reference to an `@id`.
|
|
81
|
+
- **`xsd:dateTime` needs a timezone** (`Z` or an offset), deviation #22.
|
|
82
|
+
- **Currency.** `Price.grandTotal` and `Ratings.subTotal` are plain numbers
|
|
83
|
+
(deviation #20). Set `BookingOption.unitsPreference.currency` whenever an
|
|
84
|
+
option carries a `Price`; receivers may fall back to the Waybill's
|
|
85
|
+
`CurrencyValue` units. See `docs/ONE_RECORD_2_2_PROFILE.md`.
|
|
86
|
+
- **Duplicate IRIs in `Price.ratings` are accepted**; consumers must not
|
|
87
|
+
double-count.
|
|
88
|
+
- `BookingShipment` is still the legacy shape; an ontology-shaped
|
|
89
|
+
BookingShipment is rejected by its codec until booking Path A.
|
|
90
|
+
|
|
91
|
+
## Migrating from v0.4.x to v0.5.0
|
|
92
|
+
|
|
93
|
+
Existing cargo-model imports require no changes. v0.5.0 adds a stricter,
|
|
94
|
+
separate API wire boundary:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import {
|
|
98
|
+
OneRecordServerInformationSchema,
|
|
99
|
+
OneRecordPeerProfileSchema,
|
|
100
|
+
assertEndorsedServerInformation,
|
|
101
|
+
} from '@flaks/onerecord/api'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Use these schemas at HTTP and Flaks Connect boundaries. Do not substitute the
|
|
105
|
+
older cargo-model `ServerInformationSchema` for API 2.2.0 wire validation; it
|
|
106
|
+
is retained for compatibility with existing application-layer mappings.
|
|
107
|
+
|
|
108
|
+
The peer profile contains discovery metadata, not credentials. A Connect
|
|
109
|
+
credential bundle may carry this profile, but each application must still
|
|
110
|
+
authenticate, authorize, and communicate using standard ONE Record endpoints
|
|
111
|
+
when the peer is not part of the Flaks sphere.
|
|
112
|
+
|
|
5
113
|
## Migrating from v0.3.x to v0.4.0
|
|
6
114
|
|
|
7
115
|
**No action required.** v0.4.0 is purely additive: it introduces the ULD
|
package/README.md
CHANGED
|
@@ -77,6 +77,9 @@ conformance claim independently:
|
|
|
77
77
|
- The canonical cargo data model class set (Ring 1–5, booking-flow, plus
|
|
78
78
|
10 new FWB-equivalence classes in v0.3.0) with full round-trip codecs,
|
|
79
79
|
Zod schemas, snapshot tests, and pre-Zod safety primitives.
|
|
80
|
+
- **0.6.0 Quote & Book classes:** new `Price`, `Ratings` and `TransportLegs`,
|
|
81
|
+
and ontology-complete `BookingOption`, `BookingRequest` and `Booking`
|
|
82
|
+
(see CHANGELOG and MIGRATING).
|
|
80
83
|
- Opt-in **graph-walk dispatcher** (`createMapper({ graphWalk: true })` or
|
|
81
84
|
`onerecord.dispatch.deserialize.<Class>`) emitting all four cross-node
|
|
82
85
|
integrity ParseError kinds.
|
|
@@ -213,6 +216,10 @@ No bound state; suitable for one-off operations and tree-shake-friendly imports.
|
|
|
213
216
|
|
|
214
217
|
### Booking state machine
|
|
215
218
|
|
|
219
|
+
> Deprecated in 0.6.0. These helpers implement a legacy pre-ontology flow
|
|
220
|
+
> whose roles are swapped versus ONE Record (deviation #21). They refuse
|
|
221
|
+
> ontology-shaped inputs and will be replaced in "booking Path A".
|
|
222
|
+
|
|
216
223
|
```typescript
|
|
217
224
|
import { STATE_DIAGRAM, canTransition } from '@flaks/onerecord'
|
|
218
225
|
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Endorsed ONE Record production baseline (28 July 2025).
|
|
4
|
+
*
|
|
5
|
+
* The development specification is deliberately not used as the default wire
|
|
6
|
+
* contract. Development versions can be advertised in addition to this
|
|
7
|
+
* baseline once a product implements them completely.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ONE_RECORD_API_VERSION: "2.2.0";
|
|
10
|
+
export declare const ONE_RECORD_CARGO_ONTOLOGY_VERSION: "3.2.0";
|
|
11
|
+
export declare const ONE_RECORD_ORCHESTRATION_VERSION: "1.1.0";
|
|
12
|
+
export declare const ONE_RECORD_API_ONTOLOGY: "https://onerecord.iata.org/ns/api";
|
|
13
|
+
export declare const ONE_RECORD_CARGO_ONTOLOGY: "https://onerecord.iata.org/ns/cargo";
|
|
14
|
+
export declare const ONE_RECORD_API_ONTOLOGY_VERSION: "https://onerecord.iata.org/ns/api/2.2.0";
|
|
15
|
+
export declare const ONE_RECORD_CARGO_ONTOLOGY_VERSION_IRI: "https://onerecord.iata.org/ns/cargo/3.2.0";
|
|
16
|
+
export declare const JsonLdContextSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
17
|
+
export declare const OneRecordReferenceSchema: z.ZodObject<{
|
|
18
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
19
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$loose>;
|
|
21
|
+
export declare const OneRecordTypedValueSchema: z.ZodObject<{
|
|
22
|
+
'@value': z.ZodString;
|
|
23
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const OneRecordRequestStatusSchema: z.ZodEnum<{
|
|
26
|
+
"api:REQUEST_PENDING": "api:REQUEST_PENDING";
|
|
27
|
+
"api:REQUEST_ACCEPTED": "api:REQUEST_ACCEPTED";
|
|
28
|
+
"api:REQUEST_REJECTED": "api:REQUEST_REJECTED";
|
|
29
|
+
"api:REQUEST_FAILED": "api:REQUEST_FAILED";
|
|
30
|
+
"api:REQUEST_REVOKED": "api:REQUEST_REVOKED";
|
|
31
|
+
"api:REQUEST_ACKNOWLEDGED": "api:REQUEST_ACKNOWLEDGED";
|
|
32
|
+
}>;
|
|
33
|
+
export declare const OneRecordServerInformationSchema: z.ZodObject<{
|
|
34
|
+
'@context': z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
35
|
+
'@id': z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
36
|
+
'@type': z.ZodUnion<readonly [z.ZodLiteral<"api:ServerInformation">, z.ZodLiteral<"https://onerecord.iata.org/ns/api#ServerInformation">]>;
|
|
37
|
+
'api:hasDataHolder': z.ZodObject<{
|
|
38
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
39
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$loose>;
|
|
41
|
+
'api:hasServerEndpoint': z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
42
|
+
'api:hasSupportedApiVersion': z.ZodArray<z.ZodString>;
|
|
43
|
+
'api:hasSupportedContentType': z.ZodArray<z.ZodString>;
|
|
44
|
+
'api:hasSupportedLanguage': z.ZodArray<z.ZodString>;
|
|
45
|
+
'api:hasSupportedOntology': z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
46
|
+
'api:hasSupportedOntologyVersion': z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
47
|
+
'api:hasSupportedEncoding': z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const OneRecordChangeRequestSchema: z.ZodObject<{
|
|
50
|
+
'@type': z.ZodLiteral<"api:ChangeRequest">;
|
|
51
|
+
'api:hasChange': z.ZodUnion<readonly [z.ZodObject<{
|
|
52
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
53
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$loose>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
55
|
+
'@context': z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
56
|
+
'@id': z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
57
|
+
'api:hasRequestStatus': z.ZodObject<{
|
|
58
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
59
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>;
|
|
61
|
+
'api:isRequestedBy': z.ZodObject<{
|
|
62
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
63
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$loose>;
|
|
65
|
+
'api:isRequestedAt': z.ZodObject<{
|
|
66
|
+
'@value': z.ZodString;
|
|
67
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
'api:hasRequestStatusSince': z.ZodOptional<z.ZodObject<{
|
|
70
|
+
'@value': z.ZodString;
|
|
71
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
'api:isRevokedBy': z.ZodOptional<z.ZodObject<{
|
|
74
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
75
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$loose>>;
|
|
77
|
+
'api:isRevokedAt': z.ZodOptional<z.ZodObject<{
|
|
78
|
+
'@value': z.ZodString;
|
|
79
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>>;
|
|
81
|
+
'api:hasError': z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
export declare const OneRecordSubscriptionSchema: z.ZodObject<{
|
|
84
|
+
'@id': z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
85
|
+
'@type': z.ZodLiteral<"api:Subscription">;
|
|
86
|
+
'api:hasContentType': z.ZodOptional<z.ZodString>;
|
|
87
|
+
'api:hasSubscriber': z.ZodObject<{
|
|
88
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
89
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$loose>;
|
|
91
|
+
'api:hasTopicType': z.ZodObject<{
|
|
92
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
93
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$loose>;
|
|
95
|
+
'api:includeSubscriptionEventType': z.ZodArray<z.ZodObject<{
|
|
96
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
97
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$loose>>;
|
|
99
|
+
'api:hasTopic': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodObject<{
|
|
100
|
+
'@value': z.ZodString;
|
|
101
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strict>]>;
|
|
103
|
+
'api:expiresAt': z.ZodOptional<z.ZodObject<{
|
|
104
|
+
'@value': z.ZodString;
|
|
105
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
'api:hasDescription': z.ZodOptional<z.ZodString>;
|
|
108
|
+
'api:notifyRequestStatusChange': z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
'api:sendLogisticsObjectBody': z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
export declare const OneRecordSubscriptionRequestSchema: z.ZodObject<{
|
|
112
|
+
'@type': z.ZodLiteral<"api:SubscriptionRequest">;
|
|
113
|
+
'api:hasSubscription': z.ZodObject<{
|
|
114
|
+
'@id': z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
115
|
+
'@type': z.ZodLiteral<"api:Subscription">;
|
|
116
|
+
'api:hasContentType': z.ZodOptional<z.ZodString>;
|
|
117
|
+
'api:hasSubscriber': z.ZodObject<{
|
|
118
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
119
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$loose>;
|
|
121
|
+
'api:hasTopicType': z.ZodObject<{
|
|
122
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
123
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$loose>;
|
|
125
|
+
'api:includeSubscriptionEventType': z.ZodArray<z.ZodObject<{
|
|
126
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
127
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$loose>>;
|
|
129
|
+
'api:hasTopic': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodObject<{
|
|
130
|
+
'@value': z.ZodString;
|
|
131
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strict>]>;
|
|
133
|
+
'api:expiresAt': z.ZodOptional<z.ZodObject<{
|
|
134
|
+
'@value': z.ZodString;
|
|
135
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strict>>;
|
|
137
|
+
'api:hasDescription': z.ZodOptional<z.ZodString>;
|
|
138
|
+
'api:notifyRequestStatusChange': z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
'api:sendLogisticsObjectBody': z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
'@context': z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
142
|
+
'@id': z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
143
|
+
'api:hasRequestStatus': z.ZodObject<{
|
|
144
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
145
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$loose>;
|
|
147
|
+
'api:isRequestedBy': z.ZodObject<{
|
|
148
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
149
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$loose>;
|
|
151
|
+
'api:isRequestedAt': z.ZodObject<{
|
|
152
|
+
'@value': z.ZodString;
|
|
153
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
'api:hasRequestStatusSince': z.ZodOptional<z.ZodObject<{
|
|
156
|
+
'@value': z.ZodString;
|
|
157
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>>;
|
|
159
|
+
'api:isRevokedBy': z.ZodOptional<z.ZodObject<{
|
|
160
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
161
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$loose>>;
|
|
163
|
+
'api:isRevokedAt': z.ZodOptional<z.ZodObject<{
|
|
164
|
+
'@value': z.ZodString;
|
|
165
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strict>>;
|
|
167
|
+
'api:hasError': z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export declare const OneRecordAccessDelegationSchema: z.ZodObject<{
|
|
170
|
+
'@id': z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
171
|
+
'@type': z.ZodLiteral<"api:AccessDelegation">;
|
|
172
|
+
'api:hasDescription': z.ZodOptional<z.ZodString>;
|
|
173
|
+
'api:hasPermission': z.ZodArray<z.ZodObject<{
|
|
174
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
175
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$loose>>;
|
|
177
|
+
'api:isRequestedFor': z.ZodArray<z.ZodObject<{
|
|
178
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
179
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, z.core.$loose>>;
|
|
181
|
+
'api:hasLogisticsObject': z.ZodArray<z.ZodObject<{
|
|
182
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
183
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$loose>>;
|
|
185
|
+
'api:notifyRequestStatusChange': z.ZodBoolean;
|
|
186
|
+
}, z.core.$strict>;
|
|
187
|
+
export declare const OneRecordAccessDelegationRequestSchema: z.ZodObject<{
|
|
188
|
+
'@type': z.ZodLiteral<"api:AccessDelegationRequest">;
|
|
189
|
+
'api:hasAccessDelegation': z.ZodObject<{
|
|
190
|
+
'@id': z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
191
|
+
'@type': z.ZodLiteral<"api:AccessDelegation">;
|
|
192
|
+
'api:hasDescription': z.ZodOptional<z.ZodString>;
|
|
193
|
+
'api:hasPermission': z.ZodArray<z.ZodObject<{
|
|
194
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
195
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$loose>>;
|
|
197
|
+
'api:isRequestedFor': z.ZodArray<z.ZodObject<{
|
|
198
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
199
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
'api:hasLogisticsObject': z.ZodArray<z.ZodObject<{
|
|
202
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
203
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
204
|
+
}, z.core.$loose>>;
|
|
205
|
+
'api:notifyRequestStatusChange': z.ZodBoolean;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
'@context': z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
208
|
+
'@id': z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
209
|
+
'api:hasRequestStatus': z.ZodObject<{
|
|
210
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
211
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$loose>;
|
|
213
|
+
'api:isRequestedBy': z.ZodObject<{
|
|
214
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
215
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$loose>;
|
|
217
|
+
'api:isRequestedAt': z.ZodObject<{
|
|
218
|
+
'@value': z.ZodString;
|
|
219
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
'api:hasRequestStatusSince': z.ZodOptional<z.ZodObject<{
|
|
222
|
+
'@value': z.ZodString;
|
|
223
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strict>>;
|
|
225
|
+
'api:isRevokedBy': z.ZodOptional<z.ZodObject<{
|
|
226
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
227
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$loose>>;
|
|
229
|
+
'api:isRevokedAt': z.ZodOptional<z.ZodObject<{
|
|
230
|
+
'@value': z.ZodString;
|
|
231
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, z.core.$strict>>;
|
|
233
|
+
'api:hasError': z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
export declare const OneRecordNotificationSchema: z.ZodObject<{
|
|
236
|
+
'@context': z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
237
|
+
'@id': z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>>;
|
|
238
|
+
'@type': z.ZodLiteral<"api:Notification">;
|
|
239
|
+
'api:hasEventType': z.ZodObject<{
|
|
240
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
241
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
242
|
+
}, z.core.$loose>;
|
|
243
|
+
'api:hasLogisticsObject': z.ZodOptional<z.ZodObject<{
|
|
244
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
245
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
246
|
+
}, z.core.$loose>>;
|
|
247
|
+
'api:hasLogisticsEvent': z.ZodOptional<z.ZodObject<{
|
|
248
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
249
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
250
|
+
}, z.core.$loose>>;
|
|
251
|
+
'api:hasLogisticsObjectType': z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodObject<{
|
|
252
|
+
'@value': z.ZodString;
|
|
253
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strict>]>>;
|
|
255
|
+
'api:hasChangedProperty': z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodObject<{
|
|
256
|
+
'@value': z.ZodString;
|
|
257
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
258
|
+
}, z.core.$strict>]>>>;
|
|
259
|
+
'api:hasTopic': z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodObject<{
|
|
260
|
+
'@value': z.ZodString;
|
|
261
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strict>]>>;
|
|
263
|
+
'api:isTriggeredBy': z.ZodOptional<z.ZodObject<{
|
|
264
|
+
'@id': z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>, z.ZodString]>;
|
|
265
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
266
|
+
}, z.core.$loose>>;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
export declare const OneRecordOidcProfileSchema: z.ZodObject<{
|
|
269
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
270
|
+
token_endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
271
|
+
jwks_uri: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
272
|
+
grant_types_supported: z.ZodArray<z.ZodLiteral<"client_credentials">>;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
/**
|
|
275
|
+
* Flaks Connect carries this standards-only peer metadata alongside its
|
|
276
|
+
* optimized application-specific channels. It contains no plaintext secret.
|
|
277
|
+
*/
|
|
278
|
+
export declare const OneRecordPeerProfileSchema: z.ZodObject<{
|
|
279
|
+
server_endpoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
280
|
+
server_information: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
281
|
+
oidc_discovery: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
282
|
+
jwks_uri: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
283
|
+
data_holder: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SafeIri, string>>;
|
|
284
|
+
api_version: z.ZodLiteral<"2.2.0">;
|
|
285
|
+
cargo_ontology_version: z.ZodLiteral<"3.2.0">;
|
|
286
|
+
}, z.core.$strict>;
|
|
287
|
+
export type OneRecordServerInformation = z.infer<typeof OneRecordServerInformationSchema>;
|
|
288
|
+
export type OneRecordChangeRequest = z.infer<typeof OneRecordChangeRequestSchema>;
|
|
289
|
+
export type OneRecordSubscription = z.infer<typeof OneRecordSubscriptionSchema>;
|
|
290
|
+
export type OneRecordSubscriptionRequest = z.infer<typeof OneRecordSubscriptionRequestSchema>;
|
|
291
|
+
export type OneRecordAccessDelegation = z.infer<typeof OneRecordAccessDelegationSchema>;
|
|
292
|
+
export type OneRecordAccessDelegationRequest = z.infer<typeof OneRecordAccessDelegationRequestSchema>;
|
|
293
|
+
export type OneRecordNotification = z.infer<typeof OneRecordNotificationSchema>;
|
|
294
|
+
export type OneRecordPeerProfile = z.infer<typeof OneRecordPeerProfileSchema>;
|
|
295
|
+
export declare function assertEndorsedServerInformation(value: unknown): OneRecordServerInformation;
|
|
296
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAG,OAAgB,CAAA;AACtD,eAAO,MAAM,iCAAiC,EAAG,OAAgB,CAAA;AACjE,eAAO,MAAM,gCAAgC,EAAG,OAAgB,CAAA;AAChE,eAAO,MAAM,uBAAuB,EAAG,mCAA4C,CAAA;AACnF,eAAO,MAAM,yBAAyB,EAAG,qCAA8C,CAAA;AACvF,eAAO,MAAM,+BAA+B,2CACqB,CAAA;AACjE,eAAO,MAAM,qCAAqC,6CAC4B,CAAA;AAQ9E,eAAO,MAAM,mBAAmB,oKAI9B,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;iBAKrB,CAAA;AAEhB,eAAO,MAAM,yBAAyB;;;kBAK3B,CAAA;AAEX,eAAO,MAAM,4BAA4B;;;;;;;EAOvC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;kBA4CzC,CAAA;AAcJ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAM9B,CAAA;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAc7B,CAAA;AAEX,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMpC,CAAA;AAEX,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;kBAUjC,CAAA;AAEX,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMxC,CAAA;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAa7B,CAAA;AAEX,eAAO,MAAM,0BAA0B;;;;;kBAO5B,CAAA;AAEX;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;kBAU5B,CAAA;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AACjF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC/E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAC7F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAa1F"}
|