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.
Get a file by ID.
Goal
Retrieve file metadata.
Context
Called to inspect file details.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const GetFileContract = defineQuery({
meta: {
key: 'file.get',
version: '1.0.0',
stability: 'stable',
owners: ['platform.files'],
tags: ['files', 'get'],
description: 'Get a file by ID.',
goal: 'Retrieve file metadata.',
context: 'Called to inspect file details.',
},
io: {
input: GetFileInput,
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',
},
});