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.payment.record

Record a payment.

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

    Record a payment.

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

    Record a payment.

    Goal

    Track payments.

    Context

    Billing.

    Source Definition

    import { defineCommand } from '@lssm-tech/lib.contracts-spec';
    import { PaymentModel, RecordPaymentInputModel } from './payment.schema';
    
    export const RecordPaymentContract = defineCommand({
    	meta: {
    		key: 'service.payment.record',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@examples.service-business-os'],
    		tags: ['service-business-os', 'payment', 'record'],
    		description: 'Record a payment.',
    		goal: 'Track payments.',
    		context: 'Billing.',
    	},
    	io: {
    		input: RecordPaymentInputModel,
    		output: PaymentModel,
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'record-payment-happy-path',
    				given: ['Invoice exists'],
    				when: ['User records payment'],
    				then: ['Payment is recorded'],
    			},
    		],
    		examples: [
    			{
    				key: 'record-check',
    				input: { invoiceId: 'inv-456', amount: 100, method: 'check' },
    				output: { id: 'pay-123', status: 'completed' },
    			},
    		],
    	},
    });