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.
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' },
},
],
},
});