@voyantjs/flights 0.56.0 → 0.58.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/README.md CHANGED
@@ -27,6 +27,9 @@ pnpm add @voyantjs/flights
27
27
  selection, check-in, exchange, refund, void, SSR, ancillaries, and order
28
28
  listing). Provider-agnostic; implementations come from Voyant Connect,
29
29
  third-party providers, or operator-built adapters.
30
+ - **`./contract/schemas`** — zod schemas for the public flight contract
31
+ request, response, enum, and value-object shapes. Use these at HTTP, queue,
32
+ RPC, and adapter boundaries instead of re-declaring runtime validators.
30
33
  - **`./orchestration/fingerprint`** — Itinerary fingerprint helper. Two
31
34
  providers selling the same flight produce identical fingerprints.
32
35
  - **`./orchestration/fan-out`** — Multi-connection fan-out search:
@@ -86,6 +89,15 @@ const result = await fanOutFlightSearch({
86
89
  // result.perConnection — status + latency per connection.
87
90
  ```
88
91
 
92
+ ### Runtime validation
93
+
94
+ ```typescript
95
+ import { flightBookRequestSchema } from "@voyantjs/flights/contract/schemas"
96
+ import type { FlightBookRequest } from "@voyantjs/flights/contract/types"
97
+
98
+ const request: FlightBookRequest = flightBookRequestSchema.parse(await req.json())
99
+ ```
100
+
89
101
  ### Reference data — operator's own Postgres tables
90
102
 
91
103
  ```typescript