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.

saas.project.update

Update project details.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: example.saas-boilerplate
  • Tags: saas, project, update
  • File: packages/examples/saas-boilerplate/src/project/project.operations.ts
  • field.key.label
    saas.project.update
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    saas.project.update
    field.description.label

    Update project details.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: example.saas-boilerplate
  • Tags: saas, project, update
  • File: packages/examples/saas-boilerplate/src/project/project.operations.ts
  • field.tags.label
    saas,project,update
    field.owners.label
    example.saas-boilerplate
    field.stability.label
    stable

    Update project details.

    Goal

    Allow project owners/editors to modify project.

    Context

    Project settings page.

    Emitted Events

    `project.updated` (v1.0.0)

    Source Definition

    import {
    	defineCommand,
    	defineQuery,
    } from '@lssm-tech/lib.contracts-spec/operations';
    import {
    	CreateProjectInputModel,
    	DeleteProjectInputModel,
    	DeleteProjectOutputModel,
    	GetProjectInputModel,
    	ListProjectsInputModel,
    	ListProjectsOutputModel,
    	ProjectDeletedPayloadModel,
    	ProjectModel,
    	UpdateProjectInputModel,
    } from './project.schema';
    
    export const UpdateProjectContract = defineCommand({
    	meta: {
    		key: 'saas.project.update',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['example.saas-boilerplate'],
    		tags: ['saas', 'project', 'update'],
    		description: 'Update project details.',
    		goal: 'Allow project owners/editors to modify project.',
    		context: 'Project settings page.',
    	},
    	io: {
    		input: UpdateProjectInputModel,
    		output: ProjectModel,
    	},
    	policy: {
    		auth: 'user',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'project.updated',
    				version: '1.0.0',
    				when: 'Project is updated',
    				payload: ProjectModel,
    			},
    		],
    		audit: ['project.updated'],
    	},
    	acceptance: {
    		scenarios: [
    			{
    				key: 'update-project-happy-path',
    				given: ['Project exists'],
    				when: ['User updates description'],
    				then: ['Project is updated', 'ProjectUpdated event is emitted'],
    			},
    		],
    		examples: [
    			{
    				key: 'update-desc',
    				input: { projectId: 'proj-123', description: 'New description' },
    				output: { id: 'proj-123', description: 'New description' },
    			},
    		],
    	},
    });