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 new integration.
Goal
Allow users to set up integrations with external systems.
Context
Integration setup.
Emitted Events
•
`integration.created` (v1.0.0)
Source Definition
import { defineCommand } from '@lssm-tech/lib.contracts-spec/operations';
import {
CreateIntegrationInputModel,
IntegrationModel,
} from './integration.schema';
export const CreateIntegrationContract = defineCommand({
meta: {
key: 'integration.create',
version: '1.0.0',
stability: 'stable',
owners: ['@example.integration-hub'],
tags: ['integration', 'create'],
description: 'Create a new integration.',
goal: 'Allow users to set up integrations with external systems.',
context: 'Integration setup.',
},
io: { input: CreateIntegrationInputModel, output: IntegrationModel },
policy: { auth: 'user' },
sideEffects: {
emits: [
{
key: 'integration.created',
version: '1.0.0',
when: 'Integration created',
payload: IntegrationModel,
},
],
audit: ['integration.created'],
},
acceptance: {
scenarios: [
{
key: 'create-integration-happy-path',
given: ['User is admin'],
when: ['User defines new integration type'],
then: [
'Integration definition is created',
'IntegrationCreated event is emitted',
],
},
],
examples: [
{
key: 'create-slack',
input: { name: 'Slack', category: 'communication', authType: 'oauth2' },
output: { id: 'slack', status: 'active' },
},
],
},
});