| 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/. */}
import { DataSyncConfigSchema } from '@objectstack/spec/automation';
import type { DataSyncConfig } from '@objectstack/spec/automation';
// Validate data
const result = DataSyncConfigSchema.parse(data);
| 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 |