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.
Delete a file.
Goal
Remove a file and all its versions and attachments.
Context
Called when removing a file permanently.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const DeleteFileContract = defineCommand({
meta: {
key: 'file.delete',
version: '1.0.0',
stability: 'stable',
owners: ['platform.files'],
tags: ['files', 'delete'],
description: 'Delete a file.',
goal: 'Remove a file and all its versions and attachments.',
context: 'Called when removing a file permanently.',
},
io: {
input: DeleteFileInput,
output: SuccessOutput,
errors: {
FILE_NOT_FOUND: {
description: 'File does not exist',
http: 404,
gqlCode: 'FILE_NOT_FOUND',
when: 'File ID is invalid',
},
},
},
policy: {
auth: 'user',
},
});