@voyant-travel/connect-sdk is the public TypeScript client for the Voyant Connect product. It wraps the operator and connection control plane plus the Connect-normalized data plane for inventory, bookings, and flights. Use it from non-Voyant apps and low-level tools. If you are building a Voyant operator app that should pull Connect inventory into the platform catalog, use @voyant-travel/connect-adapter instead.
Install
Create a client
operatorId is the default scope for operator-scoped calls. Any call accepts a per-call { operatorId } override.
Control plane
The control plane manages operators, connections, and everything around them:Data plane
The data plane returns Connect-normalized inventory. Cross-connection reads aggregate across every connection in an operator’s catalog:products.list, suppliers.list, and bookings.listAll aggregate across connections. Both connectionId and providerKey accept a scalar or an array.
The data-plane groups:
Flights
Theflights group covers the full air lifecycle: search, searchStream, searchOnConnection, price, book, getOrder, cancelOrder, ticketOrder, getSeatMap, selectSeats, getAncillaries, addAncillary, checkIn, exchange, refund, voidOrder, and addServiceRequest.
flights.searchStream returns the raw Response so you can stream Server-Sent Events yourself. Each connection-result event corresponds to one provider settling, and the final event carries the merged, paginated response.
Authentication
- A static API key in
Authorization: Bearer <key>is the default. - For machine-to-machine flows, exchange OAuth client credentials for a short-lived bearer token with
client.oauth.issueToken({ ... }). The response is the raw OAuth shape:access_token,expires_in,scope. - Both flows hit the same scope-checked routes; the token’s
scopeclaim must include the scope a route declares.
Idempotency
bookings.create accepts { idempotencyKey }, sent as the Idempotency-Key header and replayed against the server-side dedupe table. Always pass one when creating bookings so retries do not double-book.
Next steps
Connect adapter
Pull this inventory into a Voyant app’s catalog.
Concepts
Operators, connections, grants, and supply models.