OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Create a sync configuration.
Goal
Define how data should be synchronized.
Context
Sync setup.
Emitted Events
•
`integration.syncConfig.created` (v1.0.0)
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import {
AddFieldMappingInputModel,
CreateSyncConfigInputModel,
FieldMappingModel,
ListSyncRunsInputModel,
ListSyncRunsOutputModel,
SyncConfigModel,
SyncRunModel,
TriggerSyncInputModel,
} from './sync.schema';
export const CreateSyncConfigContract = defineCommand({
meta: {
key: 'integration.syncConfig.create',
version: '1.0.0',
stability: 'stable',
owners: ['@example.integration-hub'],
tags: ['integration', 'sync', 'config', 'create'],
description: 'Create a sync configuration.',
goal: 'Define how data should be synchronized.',
context: 'Sync setup.',
},
io: { input: CreateSyncConfigInputModel, output: SyncConfigModel },
policy: { auth: 'user' },
sideEffects: {
emits: [
{
key: 'integration.syncConfig.created',
version: '1.0.0',
when: 'Sync config created',
payload: SyncConfigModel,
},
],
audit: ['integration.syncConfig.created'],
},
acceptance: {
scenarios: [
{
key: 'create-sync-happy-path',
given: ['User is authenticated'],
when: ['User creates sync config'],
then: ['Sync config is created', 'SyncConfigCreated event is emitted'],
},
],
examples: [
{
key: 'create-contact-sync',
input: {
name: 'Contacts Sync',
sourceConnectionId: 'conn-1',
targetConnectionId: 'conn-2',
},
output: { id: 'sync-123', status: 'active' },
},
],
},
});