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 presigned download URL.
Goal
Generate a temporary URL for downloading.
Context
Called when user wants to download a file.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const GetDownloadUrlContract = defineQuery({
meta: {
key: 'file.downloadUrl',
version: '1.0.0',
stability: 'stable',
owners: ['platform.files'],
tags: ['files', 'download'],
description: 'Get a presigned download URL.',
goal: 'Generate a temporary URL for downloading.',
context: 'Called when user wants to download a file.',
},
io: {
input: GetDownloadUrlInput,
output: PresignedUrlModel,
errors: {
FILE_NOT_FOUND: {
description: 'File does not exist',
http: 404,
gqlCode: 'FILE_NOT_FOUND',
when: 'File ID is invalid',
},
},
},
policy: {
auth: 'user',
},
});