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.job.schedule

Schedule a job.

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

    Schedule a job.

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

    Schedule a job.

    Goal

    Schedule work.

    Context

    Job scheduling.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    import {
    	CompleteJobInputModel,
    	JobModel,
    	ScheduleJobInputModel,
    } from './job.schema';
    
    export const ScheduleJobContract = defineCommand({
    	meta: {
    		key: 'service.job.schedule',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@examples.service-business-os'],
    		tags: ['service-business-os', 'job', 'schedule'],
    		description: 'Schedule a job.',
    		goal: 'Schedule work.',
    		context: 'Job scheduling.',
    	},
    	io: {
    		input: ScheduleJobInputModel,
    		output: JobModel,
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'schedule-job-happy-path',
    				given: ['Client exists'],
    				when: ['User schedules job'],
    				then: ['Job is created with status SCHEDULED'],
    			},
    		],
    		examples: [
    			{
    				key: 'schedule-repair',
    				input: {
    					clientId: 'client-123',
    					date: '2025-01-20T10:00:00Z',
    					type: 'repair',
    				},
    				output: { id: 'job-456', status: 'scheduled' },
    			},
    		],
    	},
    });