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.

service.client.create

Create a new client.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @examples.service-business-os
  • Tags: service-business-os, client, create
  • File: packages/examples/service-business-os/src/client/client.operations.ts
  • field.key.label
    service.client.create
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    service.client.create
    field.description.label

    Create a new client.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @examples.service-business-os
  • Tags: service-business-os, client, create
  • File: packages/examples/service-business-os/src/client/client.operations.ts
  • field.tags.label
    service-business-os,client,create
    field.owners.label
    @examples.service-business-os
    field.stability.label
    stable

    Create a new client.

    Goal

    Onboard clients.

    Context

    CRM.

    Source Definition

    import { defineCommand } from '@lssm-tech/lib.contracts-spec';
    import { ClientModel, CreateClientInputModel } from './client.schema';
    
    export const CreateClientContract = defineCommand({
    	meta: {
    		key: 'service.client.create',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@examples.service-business-os'],
    		tags: ['service-business-os', 'client', 'create'],
    		description: 'Create a new client.',
    		goal: 'Onboard clients.',
    		context: 'CRM.',
    	},
    	io: {
    		input: CreateClientInputModel,
    		output: ClientModel,
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'create-client-happy-path',
    				given: ['User is authenticated'],
    				when: ['User creates a new client'],
    				then: ['Client is created'],
    			},
    		],
    		examples: [
    			{
    				key: 'create-basic',
    				input: {
    					name: 'Acme Corp',
    					email: 'contact@acme.com',
    					phone: '555-0123',
    				},
    				output: { id: 'client-123', name: 'Acme Corp' },
    			},
    		],
    	},
    });