@voyant-travel/flights-contracts
v0.104.4
Published
Pure flight `SourceAdapter` contracts, schemas, and reference-data shapes for adapter implementers and external consumers that need to integrate flight providers without the flights runtime.
Readme
@voyant-travel/flights-contracts
Pure flight SourceAdapter contracts, schemas, and reference-data shapes for
adapter implementers and external consumers that need to integrate flight
providers without the flights runtime.
Use this package for the FlightConnectorAdapter contract, the flight contract
types (offers, orders, segments, search, booking, post-book operations), the
matching Zod schemas, and the ReferenceDataProvider reference-data shapes
(plus the static-bundle provider). Use @voyant-travel/flights when you also need
the orchestration fan-out, snapshot capture, local-Postgres reference provider,
or other runtime integration with the catalog plane.
Install
pnpm add @voyant-travel/flights-contracts zodExports
./contract/types— flight contract types (offers, orders, segments, search, booking, ancillaries, seat maps, capability ids)../contract/adapter— theFlightConnectorAdaptercontract + adapter context/capabilities and theCAPABILITY_NOT_SUPPORTEDhelpers../contract/schemas— Zod schemas mirroring the contract types../contract/post-book-types— post-book operation types (seat selection, check-in, modify, refund, void, SSR)../reference/contract— theReferenceDataProvidercontract + reference data shapes (airline, airport, aircraft)../reference/static-bundle— the in-memory static-bundle reference provider.
Usage
import {
flightSearchRequestSchema,
type FlightConnectorAdapter,
} from "@voyant-travel/flights-contracts"@voyant-travel/flights re-exports this contract surface, so existing
@voyant-travel/flights/contract/* and @voyant-travel/flights/reference/* import paths
remain unchanged for applications that already depend on the full runtime
package.
