| title |
Connector |
| description |
Connector protocol schemas |
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
**Source:** `packages/spec/src/automation/connector.zod.ts`
import { Connector, ConnectorTrigger, DataSyncConfig } from '@objectstack/spec/automation';
import type { Connector, ConnectorTrigger, DataSyncConfig } from '@objectstack/spec/automation';
// Validate data
const result = Connector.parse(data);
| Property |
Type |
Required |
Description |
| id |
string |
✅ |
Connector ID (snake_case) |
| name |
string |
✅ |
Connector name |
| description |
string |
optional |
Connector description |
| version |
string |
optional |
Connector version |
| icon |
string |
optional |
Connector icon |
| category |
Enum<'crm' | 'payment' | 'communication' | 'storage' | 'analytics' | 'database' | 'marketing' | 'accounting' | 'hr' | 'productivity' | 'ecommerce' | 'support' | 'devtools' | 'social' | 'other'> |
✅ |
Connector category |
| baseUrl |
string |
optional |
API base URL |
| authentication |
{ type: Enum<'none' | 'apiKey' | 'basic' | 'bearer' | 'oauth1' | 'oauth2' | 'custom'>; fields?: { name: string; label: string; type: Enum<'text' | 'password' | 'url' | 'select'>; description?: string; … }[]; oauth2?: object; test?: object } |
✅ |
Authentication config |
| operations |
{ id: string; name: string; description?: string; type: Enum<'read' | 'write' | 'delete' | 'search' | 'trigger' | 'action'>; … }[] |
optional |
Connector operations |
| triggers |
{ id: string; name: string; description?: string; type: Enum<'webhook' | 'polling' | 'stream'>; … }[] |
optional |
Connector triggers |
| rateLimit |
{ requestsPerSecond?: number; requestsPerMinute?: number; requestsPerHour?: number } |
optional |
Rate limiting |
| author |
string |
optional |
Connector author |
| documentation |
string |
optional |
Documentation URL |
| homepage |
string |
optional |
Homepage URL |
| license |
string |
optional |
License (SPDX identifier) |
| tags |
string[] |
optional |
Connector tags |
| verified |
boolean |
✅ |
Verified connector |
| metadata |
Record<string, any> |
optional |
Custom metadata |
| Property |
Type |
Required |
Description |
| id |
string |
✅ |
Trigger ID (snake_case) |
| name |
string |
✅ |
Trigger name |
| description |
string |
optional |
Trigger description |
| type |
Enum<'webhook' | 'polling' | 'stream'> |
✅ |
Trigger mechanism |
| config |
Record<string, any> |
optional |
Trigger configuration |
| outputSchema |
Record<string, any> |
optional |
Event payload schema |
| pollingIntervalMs |
integer |
optional |
Polling interval in ms |
| Property |
Type |
Required |
Description |
| name |
string |
✅ |
Sync configuration name (snake_case) |
| label |
string |
optional |
Sync display name |
| description |
string |
optional |
Sync description |
| source |
{ object?: string; filters?: any; fields?: string[]; connectorInstanceId?: string; … } |
✅ |
Data source |
| destination |
{ object?: string; connectorInstanceId?: string; operation: Enum<'insert' | 'update' | 'upsert' | 'delete' | 'sync'>; mapping?: Record<string, string> | { source: string; target: string; transform?: { type: 'constant'; value: any } | { type: 'cast'; targetType: Enum<'string' | 'number' | 'boolean' | 'date'> } | { type: 'lookup'; table: string; keyField: string; valueField: string } | { type: 'javascript'; expression: string | { dialect: Enum<'cel' | 'cron' | 'template'>; source?: string; ast?: any; meta?: object } } | { type: 'map'; mappings: Record<string, any> }; defaultValue?: any }[]; … } |
✅ |
Data destination |
| direction |
Enum<'push' | 'pull' | 'bidirectional'> |
optional |
Sync direction |
| syncMode |
Enum<'full' | 'incremental' | 'realtime'> |
optional |
Sync mode |
| conflictResolution |
Enum<'source_wins' | 'destination_wins' | 'latest_wins' | 'manual' | 'merge'> |
optional |
Conflict resolution |
| schedule |
string | { dialect: Enum<'cel' | 'cron' | 'template'>; source?: string; ast?: any; meta?: object } |
optional |
Cron schedule |
| enabled |
boolean |
optional |
Sync enabled |
| changeTrackingField |
string |
optional |
Field for change tracking |
| batchSize |
integer |
optional |
Batch size for processing |
| retry |
{ maxAttempts?: integer; backoffMs?: integer } |
optional |
Retry configuration |
| validation |
{ required?: string[]; unique?: string[]; custom?: { name: string; condition: string | { dialect: Enum<'cel' | 'cron' | 'template'>; source?: string; ast?: any; meta?: object }; message: string }[] } |
optional |
Validation rules |
| errorHandling |
{ onValidationError?: Enum<'skip' | 'fail' | 'log'>; onSyncError?: Enum<'skip' | 'fail' | 'retry'>; notifyOnError?: string[] } |
optional |
Error handling |
| optimization |
{ parallelBatches?: boolean; cacheEnabled?: boolean; compressionEnabled?: boolean } |
optional |
Performance optimization |
| audit |
{ logLevel?: Enum<'none' | 'error' | 'warn' | 'info' | 'debug'>; retainLogsForDays?: integer; trackChanges?: boolean } |
optional |
Audit configuration |
| tags |
string[] |
optional |
Sync tags |
| metadata |
Record<string, any> |
optional |
Custom metadata |