Vendo SDKs
SDK Reference

TypeScript SDK

@vendodev/sdk v1.0.0 — install, public surface, and reference links.

Package

Package@vendodev/sdk
Version1.0.0
npmnpmjs.com/package/@vendodev/sdk
Sourcegithub.com/runvendo/vendo-sdk-js
ChangelogCHANGELOG.md
RequiresNode 18+, Deno 1.40+

Install

npm install @vendodev/sdk

Public surface

Vendo class

import { Vendo } from "@vendodev/sdk";

const vendo = new Vendo({
  apiKey?: string,      // defaults to process.env.VENDO_API_KEY
  baseUrl?: string,     // defaults to process.env.VENDO_BASE_URL || "https://vendo.run/api"
  apiVersion?: string,  // defaults to "2026-05-02"
});

await vendo.token(slug: string): Promise<string>
await vendo.tokens(slugs: string[]): Promise<Record<string, string | null>>
await vendo.invalidate(slug: string): Promise<void>
vendo.forRequest(headers: HeadersLike): Vendo  // Vendo mode only
vendo.forUser(jwt: string): Vendo              // Vendo mode only
await vendo.connectUrl(slug: string, opts?: { returnTo?: string }): Promise<string>

// Sub-APIs
vendo.connections   // ConnectionsAPI
vendo.integrations  // IntegrationsAPI
vendo.billing       // BillingAPI (Vendo mode only)
vendo.events        // EventsAPI (Vendo mode only)
vendo.webhooks      // WebhooksAPI (both modes)
vendo.sso           // SSOAPI
vendo.deployment    // DeploymentAPI

Top-level helpers

import { isVendoMode, connectUrl, getCredential } from "@vendodev/sdk";

isVendoMode(): boolean
connectUrl(slug, opts): string
getCredential(slug)  // legacy 0.0.x compat

ConnectionsAPI

await vendo.connections.list(): Promise<Connection[]>
await vendo.connections.get(slug: string): Promise<Connection | null>

IntegrationsAPI

await vendo.integrations.list(): Promise<Integration[]>
await vendo.integrations.get(slug: string): Promise<Integration | null>
await vendo.integrations.envVars(slug: string): Promise<string[]>

BillingAPI (Vendo mode only)

await vendo.billing.balance(): Promise<Balance>

EventsAPI (Vendo mode only)

for await (const event of vendo.events.subscribe()) { ... }
for await (const event of vendo.events.subscribe({ signal: AbortSignal })) { ... }

WebhooksAPI

vendo.webhooks.verify(
  headers: Record<string, string>,
  body: string
): WebhookEvent

Reconciler (Node only)

import { reconciler } from "@vendodev/sdk";

await reconciler.start({
  envFile: string,
  mapping: () => Promise<Record<string, string>>,
  onChange: "restart" | ((diff: Record<string, string>) => void),
})

Error classes

import {
  VendoError,
  NotConnected,
  NeedsReauth,
  AuthError,
  RateLimited,
  BalanceExhausted,
  SpendCapExceeded,
  UpstreamError,
  ValidationError,
  IdempotencyConflict,
  VendoOnlyFeature,
  IdentityNotPresent,
} from "@vendodev/sdk";

See Concepts: Errors for usage.

Testing utilities

import { MockClient, fakeConnection } from "@vendodev/sdk";

Browser entry point

import { register, VendoConnectButton, VendoConnectionCard } from "@vendodev/sdk/browser";

Custom elements: <vendo-connect-button>, <vendo-connection-card>.

The SDK is fully async-first. All methods return Promise. There is no sync surface in the TypeScript package.

On this page