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.
List all jobs with filtering
Goal
Retrieve list of jobs
Context
Job management
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 ListJobsOperation = defineQuery({
meta: {
key: 'service.job.list',
version: '1.0.0',
stability: 'stable',
owners: ['@examples.service-business-os'],
tags: ['service-business-os', 'job', 'list', 'query'],
description: 'List all jobs with filtering',
goal: 'Retrieve list of jobs',
context: 'Job management',
},
io: {
input: ListJobsInputModel,
output: ListJobsOutputModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'list-jobs-happy-path',
given: ['Jobs exist'],
when: ['User lists jobs'],
then: ['List of jobs is returned'],
},
],
examples: [
{
key: 'list-active',
input: { status: 'scheduled', limit: 10 },
output: { jobs: [], total: 5 },
},
],
},
});