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.

workflow.definition.list

List workflow definitions with filtering.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.workflow-system
  • Tags: workflow, definition, list
  • File: packages/examples/workflow-system/src/workflow/workflow.operations.ts
  • field.key.label
    workflow.definition.list
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    workflow.definition.list
    field.description.label

    List workflow definitions with filtering.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.workflow-system
  • Tags: workflow, definition, list
  • File: packages/examples/workflow-system/src/workflow/workflow.operations.ts
  • field.tags.label
    workflow,definition,list
    field.owners.label
    @example.workflow-system
    field.stability.label
    stable

    List workflow definitions with filtering.

    Goal

    Browse and search available workflows.

    Context

    Workflow list, search.

    Source Definition

    import {
    	defineCommand,
    	defineQuery,
    } from '@lssm-tech/lib.contracts-spec/operations';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    import { WorkflowStatusEnum } from './workflow.enum';
    import {
    	AddStepInputModel,
    	CreateWorkflowInputModel,
    	UpdateWorkflowInputModel,
    	WorkflowDefinitionModel,
    	WorkflowStepModel,
    } from './workflow.schema';
    
    export const ListWorkflowsContract = defineQuery({
    	meta: {
    		key: 'workflow.definition.list',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@example.workflow-system'],
    		tags: ['workflow', 'definition', 'list'],
    		description: 'List workflow definitions with filtering.',
    		goal: 'Browse and search available workflows.',
    		context: 'Workflow list, search.',
    	},
    	io: {
    		input: defineSchemaModel({
    			name: 'ListWorkflowsInput',
    			fields: {
    				status: { type: WorkflowStatusEnum, isOptional: true },
    				search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
    				limit: {
    					type: ScalarTypeEnum.Int_unsecure(),
    					isOptional: true,
    					defaultValue: 20,
    				},
    				offset: {
    					type: ScalarTypeEnum.Int_unsecure(),
    					isOptional: true,
    					defaultValue: 0,
    				},
    			},
    		}),
    		output: defineSchemaModel({
    			name: 'ListWorkflowsOutput',
    			fields: {
    				workflows: {
    					type: WorkflowDefinitionModel,
    					isArray: true,
    					isOptional: false,
    				},
    				total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
    			},
    		}),
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'list-workflows-happy-path',
    				given: ['Workflow definitions exist'],
    				when: ['User lists workflows'],
    				then: ['List of workflows is returned'],
    			},
    		],
    		examples: [
    			{
    				key: 'list-all',
    				input: { limit: 10 },
    				output: { workflows: [], total: 5 },
    			},
    		],
    	},
    });