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.

file.update

Update file metadata.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.files
  • Tags: files, update
  • File: packages/libs/files/src/contracts/index.ts
  • field.key.label
    file.update
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    file.update
    field.description.label

    Update file metadata.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.files
  • Tags: files, update
  • File: packages/libs/files/src/contracts/index.ts
  • field.tags.label
    files,update
    field.owners.label
    platform.files
    field.stability.label
    stable

    Update file metadata.

    Goal

    Modify file properties without replacing content.

    Context

    Called when renaming or updating file metadata.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const UpdateFileContract = defineCommand({
    	meta: {
    		key: 'file.update',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.files'],
    		tags: ['files', 'update'],
    		description: 'Update file metadata.',
    		goal: 'Modify file properties without replacing content.',
    		context: 'Called when renaming or updating file metadata.',
    	},
    	io: {
    		input: UpdateFileInput,
    		output: FileModel,
    		errors: {
    			FILE_NOT_FOUND: {
    				description: 'File does not exist',
    				http: 404,
    				gqlCode: 'FILE_NOT_FOUND',
    				when: 'File ID is invalid',
    			},
    		},
    	},
    	policy: {
    		auth: 'user',
    	},
    });