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.
Enqueue a background job for async processing.
Goal
Allow services to offload work to background processing.
Context
Called by any service that needs async processing.
Emitted Events
•
`job.enqueued` (v1.0.0)
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const EnqueueJobContract = defineCommand({
meta: {
key: 'jobs.enqueue',
version: '1.0.0',
stability: 'stable',
owners: ['platform.jobs'],
tags: ['jobs', 'enqueue'],
description: 'Enqueue a background job for async processing.',
goal: 'Allow services to offload work to background processing.',
context: 'Called by any service that needs async processing.',
},
io: {
input: EnqueueJobInput,
output: JobModel,
},
policy: {
auth: 'user',
},
sideEffects: {
emits: [
{
key: 'job.enqueued',
version: '1.0.0',
when: 'Job is enqueued',
payload: JobEnqueuedPayload,
},
],
},
});