Skip to main content
@voyant-travel/connect-provider-sdk is for teams building provider integrations that run inside or alongside Voyant Connect. It contains the small set of public primitives a connector depends on: provider descriptors, credential parsing helpers, and conformance utilities. It is deliberately minimal. Provider-specific API clients, scraping logic, credential exchange, and mapping code belong in connector packages owned by the provider or by Voyant, not in this SDK.

Install

pnpm add @voyant-travel/connect-provider-sdk

Define a provider

A provider describes a supplier integration to Connect: its key, display name, auth and access models, the directions it supports, the categories it covers, and how to parse its credentials.
import {
  defineConnectProvider,
  parseJsonCredentials,
} from "@voyant-travel/connect-provider-sdk";

export const provider = defineConnectProvider({
  key: "example-cruises",
  displayName: "Example Cruises",
  authModel: "bring_your_own_credentials",
  accessModel: "credential_scoped",
  supportedDirections: ["inbound"],
  categoryCoverage: ["cruise"],
  parseCredentials(raw) {
    return parseJsonCredentials(String(raw));
  },
});

API surface

ExportPurpose
defineConnectProvider(descriptor)Declare a provider descriptor.
assertProviderKey(key)Validate a provider key.
parseJsonCredentials(raw)Parse JSON credential payloads.
ConnectProviderSdkErrorThe error type thrown by the helpers.
Key types: ConnectProviderDescriptor, ConnectConnectionContext, ConnectProviderCategory, ConnectProviderDirection, ConnectProviderAuthModel, ConnectProviderAccessModel, ConnectProviderCredentialValidationResult.

Where connector code lives

Keep the boundary clean:
  • Use this package for the public provider contract and helpers.
  • Keep provider-specific connector implementations in separate packages or repositories, especially when maintenance may be handed to the provider.
  • Use @voyant-travel/connect-sdk when calling Connect APIs as a consumer.
Connectors self-describe through a committed manifest plus a registration step that populates the provider catalog, rather than hardcoding credential forms and capabilities into the platform.

Next steps

Connect concepts

Providers, connections, and credentials.

Connect SDK

The consumer-side client.