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.

integration.syncConfig.create

Create a sync configuration.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.integration-hub
  • Tags: integration, sync, config, create
  • File: packages/examples/integration-hub/src/sync/sync.operations.ts
  • field.key.label
    integration.syncConfig.create
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    integration.syncConfig.create
    field.description.label

    Create a sync configuration.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.integration-hub
  • Tags: integration, sync, config, create
  • File: packages/examples/integration-hub/src/sync/sync.operations.ts
  • field.tags.label
    integration,sync,config,create
    field.owners.label
    @example.integration-hub
    field.stability.label
    stable

    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' },
    			},
    		],
    	},
    });