> ## Documentation Index
> Fetch the complete documentation index at: https://voyant.travel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Provider SDK

> Primitives for building a Voyant Connect provider integration: descriptors, credential helpers, and conformance utilities.

`@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

```bash theme={null}
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.

```ts theme={null}
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

| Export                              | Purpose                               |
| ----------------------------------- | ------------------------------------- |
| `defineConnectProvider(descriptor)` | Declare a provider descriptor.        |
| `assertProviderKey(key)`            | Validate a provider key.              |
| `parseJsonCredentials(raw)`         | Parse JSON credential payloads.       |
| `ConnectProviderSdkError`           | The 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`](/docs/connect/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

<CardGroup cols={2}>
  <Card title="Connect concepts" icon="sitemap" href="/docs/connect/concepts">
    Providers, connections, and credentials.
  </Card>

  <Card title="Connect SDK" icon="code" href="/docs/connect/connect-sdk">
    The consumer-side client.
  </Card>
</CardGroup>
