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.
Trigger a manual sync.
Goal
Start data synchronization.
Context
Manual sync or webhook trigger.
Emitted Events
•
`integration.sync.started` (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 TriggerSyncContract = defineCommand({
meta: {
key: 'integration.sync.trigger',
version: '1.0.0',
stability: 'stable',
owners: ['@example.integration-hub'],
tags: ['integration', 'sync', 'trigger'],
description: 'Trigger a manual sync.',
goal: 'Start data synchronization.',
context: 'Manual sync or webhook trigger.',
},
io: { input: TriggerSyncInputModel, output: SyncRunModel },
policy: { auth: 'user' },
sideEffects: {
emits: [
{
key: 'integration.sync.started',
version: '1.0.0',
when: 'Sync starts',
payload: SyncRunModel,
},
],
audit: ['integration.sync.triggered'],
},
acceptance: {
scenarios: [
{
key: 'trigger-sync-happy-path',
given: ['Sync config exists'],
when: ['User triggers sync'],
then: ['Sync run starts', 'SyncStarted event is emitted'],
},
],
examples: [
{
key: 'manual-trigger',
input: { syncConfigId: 'sync-123' },
output: { id: 'run-789', status: 'pending' },
},
],
},
});