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.invoice.issue

Issue an invoice for a job.

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

    Issue an invoice for a job.

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

    Issue an invoice for a job.

    Goal

    Bill clients.

    Context

    Billing.

    Source Definition

    import { defineCommand } from '@lssm-tech/lib.contracts-spec';
    import { InvoiceModel, IssueInvoiceInputModel } from './invoice.schema';
    
    export const IssueInvoiceContract = defineCommand({
    	meta: {
    		key: 'service.invoice.issue',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@examples.service-business-os'],
    		tags: ['service-business-os', 'invoice', 'issue'],
    		description: 'Issue an invoice for a job.',
    		goal: 'Bill clients.',
    		context: 'Billing.',
    	},
    	io: {
    		input: IssueInvoiceInputModel,
    		output: InvoiceModel,
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'issue-invoice-happy-path',
    				given: ['Job is complete'],
    				when: ['User issues invoice'],
    				then: ['Invoice is created and sent'],
    			},
    		],
    		examples: [
    			{
    				key: 'issue-standard',
    				input: {
    					jobId: 'job-123',
    					dueDate: '2025-02-01',
    					items: [{ description: 'Service', amount: 100 }],
    				},
    				output: { id: 'inv-456', status: 'issued', total: 100 },
    			},
    		],
    	},
    });