Skip to Content
BridgesConfig

Bridge Configuration

Bridges support two integration types: API (REST/GraphQL) and NPM (SDK packages). Each has its own configuration structure.

API Bridge Config

For bridges that call REST or GraphQL APIs directly:

interface ApiBridgeConfig { type: 'api'; baseUrl: string; authType: 'api_key' | 'oauth2' | 'basic' | 'bearer'; authConfig: { headerName?: string; // For API key auth tokenUrl?: string; // For OAuth2 }; rateLimiting?: { requestsPerSecond: number; retryAfterHeader?: string; }; endpoints: Record<string, ApiEndpointConfig>; }

Endpoint Config

Each endpoint maps to an API call:

FieldTypeReqDescription
method'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'HTTP method
pathstringURL path (supports template variables)
descriptionstringHuman-readable description
queryParamsRecord<string, string>Default query parameters
bodyTemplateRecord<string, unknown>Request body template
responseMappingobjectJSONPath mapping for data extraction

NPM Bridge Config

For bridges that use an npm SDK package:

interface NpmBridgeConfig { type: 'npm'; packageName: string; packageVersion?: string; clientInitialization: string; methodMappings: Record<string, NpmMethodMapping>; }

Method Mapping

Maps bridge tasks to SDK methods:

{ 'grab-orders': { method: 'client.orders.list', parameterMapping: { since: 'created_at_min' }, responseMapping: { dataPath: 'orders' }, } }

Runtime Config

At execution time, bridges receive a BridgeRuntimeConfig:

interface BridgeRuntimeConfig { credentials: Record<string, string>; settings?: Record<string, unknown>; }

credentials contains the values from the bridge’s configFields that are of type password or text. These are the sensitive values like API keys and tokens.

settings contains any additional non-credential configuration, such as selected warehouse IDs or sync preferences.